Finalised PowerShell scripts

Tidy up and validation of scripts.