May 15th, 2013

PowerTip: Find All Required Assemblies for PowerShell Modules

Doctor Scripto
Scripter

Summary: Find required assemblies for your Windows PowerShell modules.

Hey, Scripting Guy! Question How can I use Windows PowerShell to show required assemblies for my Windows PowerShell modules?

Hey, Scripting Guy! Answer Use the ExpandProperty parameter of Select-Object and choose the RequiredAssemblies property from the Get-Module cmdlet after you have imported all Windows PowerShell modules:

Get-Module -ListAvailable | Import-Module

Get-Module | Select-Object -ExpandProperty requiredassemblies

By using aliases, this command shortens to:

gmo -l | ipmo

gmo | select -Expand requiredassemblies

Author

The "Scripting Guys" is a historical title passed from scripter to scripter. The current revision has morphed into our good friend Doctor Scripto who has been with us since the very beginning.

0 comments

Discussion are closed.