Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python run powershell command and get output

import subprocess

p = subprocess.run("[COMMAND]", shell=True ,capture_output=True,text=True)#!!if windows shell=True!!

outPut = p.stdout
 
PREVIOUS NEXT
Tagged: #python #run #powershell #command #output
ADD COMMENT
Topic
Name
1+3 =