Thursday, October 27, 2011

Powershell : Get-SPSite throws not recognized error


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 , to find more information on Add-PSSnapin.


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.