Quantcast
Channel: Hey, Scripting Guy! Blog
Viewing all articles
Browse latest Browse all 3333

PowerTip: Find All PowerShell Cmdlets Except…

$
0
0

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'})


Viewing all articles
Browse latest Browse all 3333

Trending Articles