Starting to play with SharePoint PowerShell cmdlets
As you may know, SharePoint 2010 ships with Windows PowerShell. Being an automation geek, passionate by process, services and tools, I began to have a look at the INCREDIBLE possibilities brought by this architectural choice.
To start, I just retrieved the available cmdlets from SharePoint cmdlets:
- Launch SharePoint 2010 Management Shell
- Type Get-Command –PSSnapin Microsoft.SharePoint.PowerShell
- you just read them
Now, funnier: have an idea of types and totals of them, just to evaluate the upcoming task of knowing, using and documenting them :
- Type the same command, but pipe the output to a TXT file
- Get-Command -pssnapin Microsoft.SharePoint.PowerShell | Format-Table Name > SP2010cmdlets.txt
- Now Open the TXT file with Excel (2010 of course :-) ), and rework it as follows:
- Remove the useless spaces characters with =TRIM() function
- Create an “Action Type” column with =LEFT(A2”,SEARCH("-",A2)-1) – my cmdlets starts in the A2 cell
- Insert a Pivot Table to count per “Action type” and there you are:
Cmdlet Type Count Get 143 Set 110 New 93 Remove 80 Update 11 Install 10 Add 10 Uninstall 8 Import 8 Start 8 Export 8 Disable 7 Enable 6 Clear 6 Stop 5 Move 4 Initialize 3 Upgrade 3 Backup 3 Restore 3 Resume 2 Test 2 Suspend 2 Mount 2 Revoke 2 Grant 2 Dismount 2 Unpublish 1 Copy 1 Restart 1 Receive 1 Merge 1 Disconnect 1 Rename 1 Publish 1 Connect 1 Ping 1 Grand Total 553
553 cmdlets to know, use, document ….
Btw, you can save the Excel file.
< Emmanuel />