-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PsExec could not start powershell #13
Comments
It means Powershell cannot access the path to the script. In my experience, the usual culprit is network drives. I would say, try to move the script to a different drive. |
@AgentRev Hey, thanks for responding. I don't actually have any network drives. Just two SSDs and two HDDs, all local. I have tried moving the script to different locations on every drive, but it's the exact same error every time. |
At that point, it's beyond my reach. You could use Process Monitor to investigate where is PsExec trying to look and why it's not resolving it. Other people have also recommended PAExec instead, maybe give that a try. |
It wasn't PowerShell being unable to access the path to the script; it was rather PsExec being unable to access PowerShell. I just added the full path to powershell.exe in the command, and it ended up working. So, instead of
I used
(I guess my environment variables are messed up as well? Because I had to add the System32 folder to "Path" under User Variables for takeown command to work when I was manually trying to fix the permissions earlier.) |
Hello,
I am running W11 22H2. I have been trying to fix my WindowsApps folder that I messed up permissions for and came across your script. However, it's not working for some reason on my PC. I keep getting the "PsExec could not start powershell…" error. I was wondering if you could assist me a bit. Any help will be truly appreciated.
The text was updated successfully, but these errors were encountered: