Thursday, October 27, 2011

Powershell : Get-SPSite throws not recognized error

5 comments

Scenario : Get SPSite object in PowerShell 

While initializing SPSite objet in powershell, I got this error :

 The term ‘Get-SPSite’ is not recognized as the name of cmdlet, function, script file, or operable program

To resolve this issue fire this in powershell.

Add-PSSnapin Microsoft.SharePoint.Powershell

Check article here http://technet.microsoft.com/en-us/library/dd347601.aspx , to find more information on Add-PSSnapin.

5 comments:

Anonymous said...

This worked for me. Thanks!

Milan Chauhan said...

Wow ! Good to see this script helped you to achieve your task.

Veda Selvam said...

That command solved my problem. Thanks for sharing!

Veda Selvam said...

Solved the problem for me. Thanks for sharing.

Unknown said...

worked for me as well. thanks.