Quickest way to try these out is to…
- Copy-paste the script to a new file with the extension .ps1
- Modify the code to suit your environment (e.g. change the domain name)
- Start PowerShell and run Set-ExecutionPolicy Unrestricted
More information at http://technet.microsoft.com/en-us/library/hh849812.aspx
- Run the script