Get all SharePoint PowerShell Cmdlets with the Help Synopsis


I’m not sure if anyone else would ever need this, but I had a need to get all of the SharePoint 2010 PowerShell Cmdlets as well as the Help synopsis. I wanted to create a list of all of the Cmdlets as well as their help synopsis for a “Cmdlet of the Day” list.

In case anyone else ever wants to do this, it’s very simple and I thought I would share my helper function.

It literally just uses Get-Command to retrieve all Cmdlets within the Microsoft.SharePoint.PowerShell snapin, and then it uses the ForEach-Object Cmdlet to run Get-Help against each Cmdlet while using Select-Object to retrieve the Name and Synopsis.

This could easily be modified to retrieve other properties. Oh, and it should completely support being passed via the pipeline into any of the Format-* or Export-* cmdlets. I’ve used it to export to CSV for easy importing into an SP List.

Anyhow, here is the function!

function Get-SPCmdlets {
$Module = "Microsoft.SharePoint.PowerShell"
$Commands = Get-Command -Module $Module
$Commands | ForEach-Object {Get-Help $_ | Select-Object Name, Synopsis}
}

And the result is something like this:

Name Synopsis
Add-SPClaimTypeMapping Adds a claim mapping to a trusted security token service (STS) identity provider.
Add-SPDiagnosticsPerformanceCounter Adds a new instance of a performance counter to a Web front end computer or a database server.
Add-SPInfoPathUserAgent Adds a user agent to a farm.
Add-SPPluggableSecurityTrimmer Add-SPPluggableSecurityTrimmer [-UserProfileApplicationProxyId] <Guid> -PlugInId <Int32> [-QualifiedTypeName <String>] [-CustomProperties <NameValueCollection>] [-AssignmentCollection <SPAssignmentCollection>] [-Verbose] [-Debug] [-ErrorAction <ActionPreference>] [-WarningAction <ActionPreference>] [-ErrorVariable <String>] [-WarningVariable <String>] [-OutVariable <String>] [-OutBuffer <Int32>] [-WhatIf] [-Confirm]
Add-SPProfileLeader Add-SPProfileLeader [-ProfileServiceApplicationProxy] <SPServiceApplicationProxyPipeBind> [-Name] <SPProfileLeaderPipeBind> [-SiteSubscription <SPSiteSubscriptionPipeBind>] [-AssignmentCollection <SPAssignmentCollection>] [-Verbose] [-Debug] [-ErrorAction <ActionPreference>] [-WarningAction <ActionPreference>] [-ErrorVariable <String>] [-WarningVariable <String>] [-OutVariable <String>] [-OutBuffer <Int32>] [-WhatIf] [-Confirm]
Add-SPProfileSyncConnection Add-SPProfileSyncConnection [-ProfileServiceApplication] <SPServiceApplicationPipeBind> -ConnectionForestName <String> -ConnectionDomain <String> -ConnectionUserName <String> -ConnectionPassword <SecureString> [-ConnectionServerName <String>] [-ConnectionPort <Int32>] [-ConnectionUseSSL] [-ConnectionNamingContext <String>] -ConnectionSynchronizationOU <String> [-ConnectionClaimProviderTypeValue <String>] [-ConnectionClaimProviderIdValue <String>] [-ConnectionClaimIDMapAttribute <String>] [-AssignmentCollection <SPAssignmentCollection>] [-Verbose] [-Debug] [-ErrorAction <ActionPreference>] [-WarningAction <ActionPreference>] [-ErrorVariable <String>] [-WarningVariable <String>] [-OutVariable <String>] [-OutBuffer <Int32>] [-WhatIf] [-Confirm]
Add-SPServiceApplicationProxyGroupMember Adds a member to the service application proxy group.
Add-SPShellAdmin Adds a user to the SharePoint_Shell_Access role for the specified database.
Add-SPSiteSubscriptionFeaturePackMember Adds a feature to a SharePoint Feature set.
Add-SPSiteSubscriptionProfileConfig Adds a new site subscription to a User Profile Service application.
Add-SPSolution Uploads a SharePoint solution package to the farm.
Add-SPUserSolution Uploads a new sandboxed solution to the solution gallery.
Backup-SPConfigurationDatabase Performs a farm-level configuration-only backup.
Backup-SPFarm Creates a backup of an individual database, Web application, or the entire farm.
Backup-SPSite Performs a backup of a site collection.
Advertisements

One thought on “Get all SharePoint PowerShell Cmdlets with the Help Synopsis

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s