Jun-27-2024, 10:17 AM
hi all,
i can run up a powershell command with subprocess fine but now im trying to get subprocess working with my powershell script but its not passing the variables
heres my py script
ps1 script
but when i run in cmd, it runs with no errors but i get 4 blank lines
thanks,
rob
i can run up a powershell command with subprocess fine but now im trying to get subprocess working with my powershell script but its not passing the variables
heres my py script
1 2 3 4 5 6 7 8 |
import subprocess un = "username" op = "oldpassword" cnp = "newpassword" dom = "robo84" subprocess.run( f 'powershell.exe C:\\python\\test.ps1' , shell = True ) |
1 2 3 4 |
write - host $un write - host $op write - host $cnp write - host $dom |
thanks,
rob