ListCmdletParameters by Sean Kearney 3 weeks ago
embed code: <script type="text/javascript" src="http://PoshCode.org/embed/3188"></script>download | new post
Extract all Parameters for a cmdlet from GET-HELP, list them in a single column
- # To use
- # Save script as LISTPARAMETERS.PS1
- #
- # To get the parameters from a Powershell cmdlet just execute
- #
- # ./LISTPARAMETERS.PS1 -helpdata (GET-HELP GET-CHILDITEM)
- #
- # To list in a clean column, all of the parameters for GET-CHILDITEM
- #
- # ./LISTPARAMETERS.PS1 -helpdata (GET-HELP SET-QADUSER)
- #
- # To list in a clean column, all of the parameters for SET-QADUSER
- #
- # I find it handy for Cmdlets that have so many available parameters, it's hard to tell where to start
- #
- param($HelpData)
- ($HelpData).Syntax | SELECT-OBJECT –ExpandProperty SyntaxItem | SELECT-OBJECT –ExpandProperty parameter | SELECT-OBJECT name
Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.
PowerShell Code Repository