When you want to use Sharepoint CMDlets in Powershell, you need to add SharePoint Snap-In using the following CMDlets:
Add-PSSnapin "Microsoft.SharePoint.PowerShell"
If you don't add the snap in, your CMDlet command will not be recognized.
Adding snap-in for every script or Powershell window is irritating task. You can also add all the snap-in permanently to all PowerShell window using the method given in below articles.
http://blogs.msdn.com/b/kaevans/archive/2011/11/14/add-microsoft-sharepoint-powershell-snap-in-to-all-powershell-windows.aspx
Add-PSSnapin "Microsoft.SharePoint.PowerShell"
If you don't add the snap in, your CMDlet command will not be recognized.
Adding snap-in for every script or Powershell window is irritating task. You can also add all the snap-in permanently to all PowerShell window using the method given in below articles.
http://blogs.msdn.com/b/kaevans/archive/2011/11/14/add-microsoft-sharepoint-powershell-snap-in-to-all-powershell-windows.aspx
No comments:
Post a Comment