Quantcast
Channel: Hey, Scripting Guy! Blog
Viewing all articles
Browse latest Browse all 3333

PowerTip: List Folders Containing PowerShell Modules

$
0
0

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


Viewing all articles
Browse latest Browse all 3333

Trending Articles