Using Windows PowerShell to Manage SharePoint 2010

Gain management flexibility and efficient performance with Microsoft's command-line utility

The release of SharePoint 2010 (both SharePoint Foundation and SharePoint Server) offers welcome support for Windows PowerShell. Of course it has always been technically possible to use PowerShell to manage SharePoint but that involved doing a lot of work yourself to call the .NET Framework and work directly with the SharePoint Object Model or Web Services. But now it's official, and administrators get to use the power of PowerShell out of the box.

I'll show you the PowerShell implementation in SharePoint, the requirements for accessing it, and the possibilities it brings to the administration table. I assume that you have a general understanding of PowerShell 2.0 and its concepts.

Positioning STSADM and PowerShell
Before SharePoint 2010, the only command-line tool available to administer SharePoint was STSADM. STSADM still ships with SharePoint 2010 because some commands don't yet have direct PowerShell equivalents (e.g., enabling the developer dashboard), and you might still need it to support any management utilities you built that you want to continue to use against your 2010 deployment.

STSADM is itself an extensible command-line tool (182 commands were available out of the box with Microsoft Office SharePoint Server 2007—MOSS 2007) and has been put to good use in many deployments. Gary Lapointe ( provides some great examples for not only extending STSADM but also building your own PowerShell cmdlets. That said, it's likely that PowerShell will ultimately be the sole command-line utility for management in the future, and STSADM will gracefully fade away as Microsoft focuses resources on a single tool that's used across multiple server applications.

PowerShell is more flexible than STSADM in its extension capabilities. It also performs far more efficiently, especially in the batch processing area, because, with STSADM, each operation has to physically invoke the STSADM executable.



No responses found. Be the first to comment...

  • Do not include your name, "with regards" etc in the comment. Write detailed comment, relevant to the topic.
  • No HTML formatting and links to other web sites are allowed.
  • This is a strictly moderated site. Absolutely no spam allowed.
  • Name: