I got a problem when try to run powershell from command line. I typed powershell.exe when pop up window shows up in blue background saying: "This app cant run on your PC, to find version for your PC check publisher". Then command prompt gives message: "Access is denied."
Any suggestions would be highly appreciated.
My problem was that C:/windows/system32/powershell.exe
was invalid as you can see on the image below:
I could found the right executable in C:\Windows\System32\WindowsPowerShell\v1.0\
.
So if this is your problem, try the following:
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe .\my-script.ps1
Instead of this:
powershell.exe .\my-script.ps1
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With