December 11th, 2015

PowerTip: Find Module Path with Windows PowerShell

Doctor Scripto
Scripter

Summary: Use Windows PowerShell to determine the location of a module.

Hey, Scripting Guy! Question How can I use Windows PowerShell to find the location of a module that I am using from a vendor?

Hey, Scripting Guy! Answer Use the Path property of the module with Split-Path to show the parent:

$ModuleName=(Get-Module –module DeployImage)

$ModulePath=Split-Path $ModuleName

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.