Display Loaded and Available Modules in Windows PowerShell

 We don't need to Import module in powershell V3.

Display Loaded and Available Modules in Windows PowerShell_第1张图片


Windows PowerShell modules exist in two states: loaded and unloaded. To display a list of all loaded modules, you can use the Get-Module cmdlet without any parameters, as shown here:
PS C:\> Get-Module

If multiple modules are loaded when the Get-Module cmdlet is run, each module will be listed and its accompanying exported commands will appear on their own individual lines. If no modules are loaded, nothing is displayed to the Windows PowerShell console (no errors are displayed, and there is no confirmation that the command was actually run).

To obtain a listing of all modules that are available on the system but are not loaded into the Windows PowerShell console, you can use the Get-Module cmdlet with the ListAvailable parameter, as shown here:
PS C:\> Get-Module �CListAvailable



List All Cmdlets of a Specific Module in Powershell

sometime you need to know only some or all specific cmdlets for  a module. For example you just imported an “Active Directory” Module and want to know which all cmdlets imported by it.

Let's import an module first.

Import-Module ActiveDirectory

30-04-2012 23-21-03 

ok, Module is imported,,

now run the below command to list all cmdlets imported my “Active Directory” Module.

Get-Command �CModule ActiveDirectory

So here is our all Active Directory Related Cmdlets.

Display Loaded and Available Modules in Windows PowerShell_第2张图片 

How to know cmdlet belong to whcih module

Display Loaded and Available Modules in Windows PowerShell_第3张图片

你可能感兴趣的:(powershell)