Capturing output from Powershell command and saving it in a variable
Capturing output from Powershell command and saving it in a variable Question: I keep trying to run this piece of code but everytime I print, it seems to net me nothing in regards to what I see with my output. p = subprocess.run(["powershell.exe", "C://Users//xxxxx//Documents//betterNetstatOut.ps1"], shell=True, capture_output=True, text=True) output = p.stdout print(output) My PowerShell command is …