PowerTip: List Folders Containing PowerShell Modules

The Scripting Guys

Dr

Summary: Learn how to list all folders that contain Windows PowerShell modules.

Hey, Scripting Guy! Question How can I see a list of all folders that contain Windows PowerShell modules?

Hey, Scripting Guy! Answer Use the PSModulePath environmental variable, and split it to form paths to the modules. Then use the 
           Get-ChildItem cmdlet (dir is an alias) and specify only directories while using a wildcard character for a filter.
           Here is an example:

Dir ($env:PSModulePath -split ";") -Filter * -directory

The Scripting Guys
Dr Scripto

Follow Dr   

No Comments.