Showing posts with label The term is not recognized as the name of a cmdlet. Show all posts
Showing posts with label The term is not recognized as the name of a cmdlet. Show all posts

Saturday, March 12, 2011

SP 2010 Power Shell - The term 'Get-SPSite' is not recognized as the name of a cmdlet

You may see error while executing sharepoint commandlets on your machine. For example if you are trying to execute a simple commandlet as:
Get-SPSite
You may see below error:
The term 'Get-SPSite' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the
spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:11
+ Get-SPSite <<<<
+ CategoryInfo : ObjectNotFound: (Get-SPSite:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException


To resolve this error just run following command to your powershell snapin:
Add-PSSnapin Microsoft.SharePoint.Powershell