Collection of PowerShell scripts
NB!Has to be run from elevated prompt
powershell.exe -NoP -NonI -W Hidden -Enc UwBlAHQALQBFAHgAZQBjAHUAdABpAG8AbgBQAG8AbABpAGMAeQAgAC0ARQB4AGUAYwB1AHQAaQBvAG4AUABvAGwAaQBjAHkAIABVAG4AcgBlAHMAdAByAGkAYwB0AGUAZAAgAC0ARgBvAHIAYwBlAA==
Enc portion is base64 encoded and contains:
Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Force
Works on Python 2.7.10
p = subprocess.Popen(["powershell.exe", ". C:\\Temp\\test.ps1;", "test -Text 'test2'"], stdout=sys.stdout)