March 28th, 2013
0 reactions

PowerTip: Find PowerShell Noun Distribution

Scripter

Summary: Learn how to see which nouns in Windows PowerShell are used most.

Hey, Scripting Guy! Question How can I find which Windows PowerShell cmdlet nouns are used most?

Hey, Scripting Guy! Answer Import all the modules, then use the Get-Command cmdlet to retrieve all cmdlet information, and group by noun. You can also use the following commands to sort the results by count.

Note   Gmo is an alias for Get-Module, ipmo is an alias for Import-Module, gcm is an alias for Get-Command, group is an alias for Group-Object, sort is an alias for Sort-Object, and more is a Windows PowerShell function.)

gmo -li | ipmo

gcm | group noun -NoElement | sort count -Descending | more

 

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 is closed.