Datasheet

PREPARE FOR YOUR JOURNEY 7
Getting Started with
Windows PowerShell
Basics
PART 1
As you transition to SharePoint 2010, you will be pleased to note that all of the
preceding scripts will work just  ne (with the exception of the
psconfig -cmd
configdb
command, which now requires a passphrase parameter).  e main dif-
ference is that the STSADM and PSCon g executable  les are now in the 14 hive’s
BIN folder:
c:\program files\common files\microsoft shared\web server
extensions\14\bin
e combined use of STSADM and PSCon g allowed administrators the ability
to automate numerous tasks, including the complete build-out of an entire Farm.
When these command-line tools were coupled with third-party extensions, there
was very little that an administrator couldn’t automate, but there were limitations:
e out-of-the-box commands, though many, did not cover numerous aspects
of the product and did not expose many parameters.
STSADM was very slow and did not handle bulk operations well.
Everything passed into a command was a string, so all type safety was
removed and objects had to be continually re-created internally.
ough Windows PowerShell could have been used as the host, batch  les
were the standard and were very limited.
Error handling was di cult.
Eventually, some savvy administrators and developers caught on to PowerShell
and started transitioning their batch  les over to PowerShell scripts.  is not only
provided new levels of  exibility and power to what could be done with STSADM, it
also helped expose the SharePoint API to administrators without the need to create
a .NET assembly. Unfortunately, we still su ered the core limitations of STSADM
as well as a host of new issues. Administrators and developers needed more.  ey
needed direct and out-of-the-box support for the Windows PowerShell scripting
language.  ey needed to move away from STSADM.
From STSADM to Windows PowerShell
When SharePoint 2010 was introduced to the market, one of the greatest new
features of the product was the addition of over 530 PowerShell cmdlets (pro-
nounced “command-lets”). Using these cmdlets in conjunction with the SharePoint
API, administrators and developers can now automate or manipulate just about
every aspect of the SharePoint platform. Windows PowerShell is Microso ’s
c01.indd 7c01.indd 7 5/16/2011 11:12:30 AM5/16/2011 11:12:30 AM