June 17th, 2015

PowerTip: Return Specific Number of PowerShell Cmdlets

Doctor Scripto
Scripter

Summary: Learn how to return only a specific number of Windows PowerShell cmdlets.

Hey, Scripting Guy! Question How can I find only four Windows PowerShell cmdlets that use the verb Get, without seeing a
           long scrolling list of found cmdlets?

Hey, Scripting Guy! Answer Use the TotalCount parameter of the Get-Command cmdlet, for example:

Get-Command -Verb get -TotalCount 4

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.