Windows PowerShell in the SharePoint Management Shell

Applies to: SharePoint Foundation 2010

Windows PowerShellâ„¢ is a new command-line tool and supporting scripting language from Microsoft that complements Cmd.exe in the Windows administration context. In the SharePoint administration context, Windows PowerShell supersedes the Stsadm.exe administration tool. All current and future development of script and administrative files in SharePoint Foundation should use this new Windows PowerShell scripting technology that is exposed in the SharePoint Management Shell.

In the same way that the current administrative command-line tool exists in two flavors – one of them general (Cmd.exe) and the other specific to SharePoint Foundation (Stsadm.exe), Windows PowerShell also provides both a general command-line tool as well as a SharePoint-specific add-in. This difference is reflected both in the name used to denote them, as well as in their underlying object model. The SharePoint-specific tool is known by the name SharePoint Management Shell, while their difference internally is reflected in the inheritance of their respective base classes.

While Windows PowerShell cmdlets derive from the base class PSCmdlet, cmdlets for SharePoint Foundation, on the other hand, which are exposed in the SharePoint Management Shell, derive from a special base class called SPCmdlet. (Note that SPCmdlet itself derives from the PSCmdlet class.) The SPCmdlet base class is included in the Microsoft.SharePoint.PowerShell namespace.

Information about Developing Windows PowerShell Cmdlets

The following Help topics and articles describe the fundamentals of developing Windows PowerShell cmdlets.

Information about Developing Cmdlets for the SharePoint Management Shell

The following Help topics in the Microsoft SharePoint Foundation 2010 Software Development Kit (SDK) provide information about developing cmdlets for the SharePoint Management Shell.