Maybe this wasnt the right book for me but all I can say is that it is scaring me of learning powershell. Is got its own weird and wonderfull language. The booked doesnt help by laying out the scripts in a confusing and hard to follow fashion. Suppose thats because it a cookbook!
Find another one or just stick with Batch files or write whatever you want in C# or some other language.