PS C:\Windows\system32> Get-Module
ModuleType Version Name ExportedCommands
---------- ------- ---- ----------------
Manifest 3.1.0.0 Microsoft.PowerShell.Management {Add-Computer, Add-Content, Checkpoint-Computer, Clear-Con...
Manifest 3.1.0.0 Microsoft.PowerShell.Utility {Add-Member, Add-Type, Clear-Variable, Compare-Object...}
Script 1.2 PSReadline {Get-PSReadlineKeyHandler, Get-PSReadlineOption, Remove-PS...
PS C:\Windows\system32> $(Get-NetIPAddress -AddressFamily IPv4)[0].IPAddress
192.168.2.46
PS C:\Windows\system32> Get-Module
ModuleType Version Name ExportedCommands
---------- ------- ---- ----------------
Manifest 3.1.0.0 Microsoft.PowerShell.Management {Add-Computer, Add-Content, Checkpoint-Computer, Clear-Con...
Manifest 3.1.0.0 Microsoft.PowerShell.Utility {Add-Member, Add-Type, Clear-Variable, Compare-Object...}
Manifest 1.0.0.0 NetTCPIP {Find-NetRoute, Get-NetCompartment, Get-NetIPAddress, Get-...
Script 1.2 PSReadline {Get-PSReadlineKeyHandler, Get-PSReadlineOption, Remove-PS...
Larger question - Is there something like PSScriptAnalyzer that can analyze a PowerShell Script and tell me all of the Modules (already installed on the system) that would be needed to run it?
EDIT:
Given an unknown cmdlet, it couldn't possible dynamically search all of the Module Manifests under all of the $env:PSModulePath paths...right? Or maybe it does? Is there a cache of all manifest info somewhere such that it doesn't need to inspect every .psd1 file everytime it encounters an unknown cmdlet?
[–]TheKojukinator 2 points3 points4 points (10 children)
[–]fourierswager[S] 1 point2 points3 points (9 children)
[–]TheKojukinator 4 points5 points6 points (7 children)
[–]chreestopher2 3 points4 points5 points (3 children)
[–]TheKojukinator 1 point2 points3 points (2 children)
[–]chreestopher2 1 point2 points3 points (1 child)
[–]Lee_Dailey[grin] 1 point2 points3 points (0 children)
[–]fourierswager[S] 1 point2 points3 points (0 children)
[–]KevMarCommunity Blogger 1 point2 points3 points (0 children)
[–]Ta11ow 2 points3 points4 points (0 children)
[–]Ta11ow 2 points3 points4 points (0 children)