Created
March 20, 2018 15:23
-
-
Save alx9r/4773628b99ef3066cafd409b10469bf9 to your computer and use it in GitHub Desktop.
search code snippet mentioned in PowerShell/PowerShell#6419
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
| Get-Module -ListAvailable | | |
| ? {$_.Path -like '*System32*' } | | |
| % { Get-Command -Module $_ } | | |
| % { | |
| $command = $_ | |
| [pscustomobject]@{ | |
| Command = $command | |
| MOdule = $command.Module | |
| Parameter = $command | | |
| % { | |
| $_.Module | Import-Module -ErrorAction SilentlyContinue | |
| try | |
| { | |
| [System.Management.Automation.CommandMetadata]::new($_) | |
| } | |
| catch {} | |
| } | | |
| % {$_.Parameters.Values} | | |
| ? { | |
| ($_.ParameterType -in [object],[object[]]) -and | |
| ($_.Attributes.ValueFromPipeline -or $_.Attributes.ValueFromPipelineByPropertyName) | |
| } | | |
| % Name | |
| } | |
| } | | |
| ? { $_.Parameter } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment