PowerTip: Find All PowerShell Cmdlets Except…

Doctor Scripto

Dr Scripto

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

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


Comments are closed. Login to edit/delete your existing comments