Subscribe to Windows IT Pro
August 31, 2010 10:28 AM

The SharePoint Management Shell

SharePoint Pro
InstantDoc ID #125880
Rating: (0)

Main article: Learn How to Manage SharePoint with PowerShell

The SharePoint Management Shell is not just a PowerShell console. It’s a PowerShell console that’s been started with some parameters to load in support for SharePoint. Because of that you can’t fire up any old PowerShell console and expect it to work with SharePoint. If you start the default PowerShell console in Windows, or any other non-SharePoint PowerShell console, you’ll need to load the SharePoint module into the shell to manage SharePoint. You can do this with the following command:

 

Add-PSSnapin Microsoft.Sharepoint.Powershell

 

After loading the SharePoint module, you'll be able to use all the SharePoint cmdlets in this PowerShell console. You’ll have to do this every time you open up a non-SharePoint PowerShell console, so you might want to add that command to your profile so it gets loaded each time the console opens. If you aren’t sure which file is your profile, type $profile at the PowerShell prompt to see which file is loaded each time that console opens.

Note that the SharePoint Management Shell works only on machines that have SharePoint installed, and only on the SharePoint farm that machine is in. If you want to use PowerShell on your SharePoint farm from the comfort of your own desktop, use the PowerShell 2 feature called remoting. Type

Get-Help about_remoting

at a PowerShell prompt to learn more about this feature.

Related Content:

ARTICLE TOOLS

Comments
    There are no comments to display. Be the first one!
You must log on before posting a comment.

Are you a new visitor? Register Here

advertisement

advertisement

Windows is a trademark of the Microsoft group of companies. Windows IT Pro is used by Penton Media Inc. under license from owner.