Module Contents

I’ve been writing a few modules recently and sometimes forget what I have in each module. Simple way to view the functions each module makes available.

001
002
003
004
005
006
007
Clear-Host
Get-Module -ListAvailable | foreach {
    Import-Module $_.Name
    Get-Command -Module $_.Name | Select Module, Name
    Remove-Module $_.Name
    ""
}

 

List the available modules and for each one import the module and then use Get-Command to find the functions each one loads. We can then remove the module.

Technorati Tags: ,

Advertisements
This entry was posted in PowerShell V2. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s