January 21st, 2016

PowerTip: Find top PowerShell cmdlet nouns

Doctor Scripto
Scripter

Summary: Learn how to find the top five nouns in Windows PowerShell cmdlets.

Hey, Scripting Guy! Question How can I find which nouns are the most prevalent in Windows PowerShell cmdlets?

Hey, Scripting Guy! Answer You need to find all of the cmdlet names, group them by noun, sort them by count, and then select only
           the first five, for example:

gcm * -CommandType cmdlet | group noun -noelement | sort count -Descending | select -First 5

Note gcm is an alias for Get-Command.

Category
Scripting

Author

The "Scripting Guys" is a historical title passed from scripter to scripter. The current revision has morphed into our good friend Doctor Scripto who has been with us since the very beginning.

0 comments

Discussion are closed.

Feedback