Administering Service Applications Using the SharePoint 2010 Management Shell
Published: May 2010
The SharePoint Management Shell in SharePoint Foundation 2010 provides an extensive set of Windows PowerShell cmdlets that make development, deployment, and administration of SharePoint 2010 easier and more efficient.
The SharePoint Management Shell supersedes the Stsadm.exe administration tool. All current and future development of command-line tools and administrative files in Microsoft SharePoint Foundation 2010 should use this new scripting technology.
The Stsadm commands used to create, enumerate, and manage Shared Services Providers (SSPs) are not usable with the Service Application Framework.
To use the SharePoint Foundation 2010 cmdlets from inside the Windows PowerShell command window, you can add the SharePoint 2010 snap-in to Windows PowerShell.
To add the SharePoint snap-in to Windows PowerShell
Open Windows PowerShell.
In the Windows PowerShell window, type get-PSSnapin – Registered. The SharePoint Foundation 2010 snap-in is listed.
In the Windows PowerShell window, type Add-PSSnapin Microsoft.SharePoint.Powershell.
You can also add the Windows PowerShell snap-in permanently to your Windows PowerShell $profile.
The following table describes the Windows PowerShell nouns and verbs that developers of Service Application Framework applications will most commonly use to manage services, service instances, and service applications.
Windows PowerShell Commands
Documentation of these cmdlets is provided in the SharePoint Management Shell.
When you develop your service you can override the SharePoint 2010-specific Windows PowerShell verbs to add their own parameters. However, such custom parameters must conform to the same standards as SharePoint 2010. The following are suggested best practices to use when you create or modify cmdlets:
If you are deriving from an existing object, replace the SP prefix on the noun with the name of your service or feature.
If you are deriving from an existing SharePoint 2010 object, call the base object's methods for all common operations.
Reuse existing parameter names whenever possible.