The term is not recognized as the name of a cmdlet

You have been asked to execute a powershell script on windows server OS based machines or even on desktop OS based machines but you get error says script execution blocked.

Apparently you will try setting up and execution policy to allow as per your requirement and that’s where you’ll get new error … any command you try it’ll return “The term is not recognized as the name of a codlet”.

Ex: you try run “Set-ExecutionPolicy RemoteSigned” this is the error you’ll get.

Then you try searching for the solution and you tried every option you come across on the internet but nothing works. That’s fine and It’s normal as it’s Monday morning shift 🙂

My Scenario : By default 32 bit PowerShell is running whenever you open it and in my case (I suspect) most of system related modules were corrupted or not loading properly even when you try loading them manually.

Then try running the below command, then your subsequent script should work fine now.

c:\windows\syswow64\windowspowershell\v1.0\powershell.exe -ExecutionPolicy Unrestricted

Note : You can set required option like RemoteSigned, etc.

Leave a comment

Start a Blog at WordPress.com.