Created
April 9, 2015 00:02
-
-
Save gpduck/f64aaea6f3aa87a4049d to your computer and use it in GitHub Desktop.
Module Verb Coverage
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ModuleName = "YourModule" | |
$Verbs = Get-Command -Module $ModuleName | Select -Unique -ExpandProperty Verb | Sort | |
Get-Command -Module $ModuleName | Group Noun | %{ | |
$Cmds = $_.Group | |
$Noun = $_.Name | |
$VerbCoverage = [Ordered]@{ | |
Noun = $Noun | |
} | |
$Verbs | %{ | |
$Verb = $_ | |
$VerbCoverage.Add($Verb, ($Cmds.Verb -contains $Verb)) | |
} | |
New-Object PSObject -Property $VerbCoverage | |
} | ft -auto |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment