import subprocess, sys def callPS(psfile,mode,machine): p = subprocess.Popen(["powershell.exe", "-ExecutionPolicy", "Bypass", "-File", psfile, mode, machine], stdout=subprocess.PIPE) print(p.communicate()) aws_script = "C:\\Users\\uday\\Desktop\\helloworld.ps1" callPS(aws_script,"start","devbuild1")
Saturday, November 3, 2018
call powershell script from python with arguments
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment