Ok, first entry
When working with powershell, one of the first things you will need is to debug your script.
There is actually functionality for this build in right out of the box.
A very basic way of making this work could be like the following:
# Add the two lines, for basic debugging functionality
# Ok, this is what is needed.
# When you run your script, you can add various debugging parameters, that make the following write snippets fire :
write-output "This is standard output"
write-debug "Debug mode enabled"
write-verbose "Verbose output enabled"
write-output "all done"
So to enable debug-mode, run your script with -debug as parameter, or you could use -verbose for, well, verbose output.
More powershell related stuff to be online shortly. Currently I am working on a setup to automate patching of .wim files for Windows installation.