PowerTip: Find All PowerShell Cmdlets Except…


Summary: Learn how to find all Windows PowerShell cmdlets except those from a specific module.

Hey, Scripting Guy! Question How can I find all Windows PowerShell cmdlets that begin with the verb "get" but are not contained in the
           Windows PowerShell module named “PowerShellCookbook”?

Hey, Scripting Guy! Answer Use the Get-Command cmdlet, and use the Where method to filter that the module name does not equal
           “PowerShellCookbook”:

(Get-Command -Verb get).where({$_.modulename -ne 'powershellcookbook'})

Comments (0)

Skip to main content