Chapter 10: Administering SharePoint 2010 with Windows PowerShell

What’s In This Chapter?

  • Basic Windows PowerShell usage
  • How to use common SharePoint 2010 cmdlets
  • The SharePoint object model

PowerShell is now the command-line tool for administering SharePoint 2010. In previous versions of SharePoint, administrators worked with STSADM.exe. Starting with SharePoint 2007, we began seeing some integration with PowerShell and SharePoint. With no commands provided we managed to create our own PowerShell commands and scripts for SharePoint 2007. To do so some of us had to get our hands dirty and either put on our developer hat or beg, borrow, and steal from friends on the Internet. Ultimately, we ended up with some PowerShell scripts for SharePoint 2007 even if we really didn’t understand how they worked under the covers. With the 2010 version of SharePoint, the use of PowerShell for administration is different, much different.

Now we have commands and a management shell that installs with SharePoint 2010 — and when we say commands, we mean a lot of commands, well over 500. STSADM only boasted around 185 commands. More important, these 500 plus commands can be chained together and scripted, enabling you to create practically an infinite number of scripts and commands.

In this chapter we will get you up to speed on PowerShell in general, and then show you how to harness the power of this beast to benefit your SharePoint 2010 farm.

Introduction to Windows PowerShell

There is no requirement ...

Get Professional SharePoint® 2010 Administration now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.