O'Reilly logo

Real World SharePoint® 2010: Indispensable Experiences from 22 MVPs by Shane Young, Randy Williams, Mike Walsh, Nick Swan, John Ross, Asif Rehmani, Joris Poelmans, Chris O'Brien, Ágnes Molnár, Jason Medero, Igor Macori, Gary Lapointe, Todd Klindt, Randy Drisgill, Andrew Connell, Adam Buenz, Claudio Brotto, Karine Bosch, Robert Bogue, Todd Bleeker, Darrin Bishop, Reza Alirezaei

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 5. Using Powershell with SharePoint 2010

BY GARY LAPOINTE

SharePoint is an incredibly powerful and complex application that takes considerable time and effort to master. I started working with the enterprise version of SharePoint 2007 (MOSS) shortly after it released, and I became quickly overwhelmed by the amount of configuration settings it took to get the product up and running properly. I was creating what turned out to be a rather massive document detailing every configuration and taxonomy change that was needed for an upgrade from my company's SharePoint 2003 environment to SharePoint 2007. It quickly became apparent that tracking all the necessary changes using a document was a pointless and tedious exercise. That's when I discovered the true power of STSADM, the command-line tool used to automate SharePoint 2007.

It turned out that STSADM was easily extendable, allowing developers to supplement the existing 184 out-of-the-box commands with additional commands as necessary. Using this information, I began developing a series of batch files that not only used the out-of-the-box commands, but also used numerous custom command extensions that I built. The end result was that I was easily able to script an entire farm configuration, everything from creating and provisioning farm components, to adding items to lists and migrating site collections.

However, with all the power that STSADM exposed, it was, in many ways, extremely limited. Conditional logic was very difficult ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required