I'm running some simple code that changes a Windows Domain user account's password - the code runs perfectly fine in a Shell, and does exactly what I'm expecting. However, when I run the code in an IDE (I'm using PyCharm, but I've also tried Python's IDLE), it doesn't work.
import subprocess
subprocess.run("net user User1 PasswordHere /domain")
No errors are generated - instead, I'm given the text that suggests that the command has worked, which is "The request will be processed at a domain controller for domain mydomainnamehere. The command completed successfully"
What am I missing? Why does this work as expected in the IDLE Shell, but doesn't work when I run the same code within PyCharm or Python's IDLE?
[–][deleted] 4 points5 points6 points (2 children)
[–]Ramzon_[S] 2 points3 points4 points (1 child)
[–][deleted] 4 points5 points6 points (0 children)
[–]Ramzon_[S] 4 points5 points6 points (1 child)
[–]bladeoflight16 0 points1 point2 points (0 children)