Monday, September 5, 2011

PowerShell snap in not loading in SharePoint Management Shell

Recently on one of my VMs I came acrosss the above error on opening SharePoint Mangement Shell, which mentioned that "The term 'C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\CONFIG\POWERSHELL\Registration\\sharepoint.ps1' is not recognized as the name of a cmdlet, function, ..."

As a newbie to PowerShell it took me quite some time of searching for a solution I realized I simply had to enable a feature in the server manager (as the OS is Windows Server 2008 R2 Enterprise). The steps for this are listed in the link below-

Note: The name of the feature will vary based on OS version - e.g. for Windows Server 2008 the feature name is Windows PowerShell.

if you see the following error message
File "testpath.ps1" cannot be loaded because the execution of scripts is disabled on this system. Please see "get-help about_signing" for more details.

you need to change execution policy of the powershell, you can use the following link to learn how to do that.

Hope this helps someone facing the same issue.

No comments:

Post a Comment