Add Powershell support for Windows

Combine @cyberious and @reidmv commits for Windows support.