November 11th, 2014

PowerTip: Examine PowerShell Cmdlet Coverage

Doctor Scripto
Scripter

Summary: Learn how to examine where Windows PowerShell cmdlets come from.

Hey, Scripting Guy! Question How can I use Windows PowerShell to find which modules supply the most cmdlets of a particular type?

Hey, Scripting Guy! Answer Use the Get-Command cmdlet and specify a particular verb (such as Get), pipe the resulting objects
           to the Group-Object cmdlet to group by the ModuleName property, then sort the results in a
           descending fashion, for example:

get-command -verb get | group ModuleName | sort count -Descending

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