First published on TECHNET on Aug 04, 2016 Hello All,
Earlier this week I was going thru my RSS feed and found an article about the cmdlet Show-Command and thought it was cool enough that I wanted to tell you about it.
This cmdlet allows you to have a GUI for your cmdlet’s so we can get something like this, as you can see this cmdlet is a fantastic tool as you learn how to use PowerShell and it works with not only your basic cmdlet’s but your SharePoint cmdlet’s as well.
This code opens a GUI for the cmdlet Get-SPSite:
As you can see the GUI will provide you with the available parameters and space to fill in what you would like to have in there, as well you can expand the Common parameters if you want to use parameters like ErrorAction
Once you fill in the blanks with the information that you think is correct, you can do 1 of these 2 things. You can run the command or you can copy, when you run it then the cmdlet is copied to your PowerShell window and executed with the parameters you provided it. But if you choose copy then it will copy the cmdlet with parameters to your clipboard and you can paste it anywhere you want.
NOTE: The Show-command will separate parameter sets into different tabs as you can see Get-SPSite has 4 which are AllSitesInWebApplication, AllSitesInContentDB, AllSitesInIdentity, and AllSitesInSiteSubscription