您的位置:首页 > 运维架构 > Shell

Display Loaded and Available Modules in Windows PowerShell

2016-02-03 15:04 771 查看
We don't need to Import module in powershell V3.




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 –ListAvailable

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


ok, Module is imported,,now run the below command to list all cmdlets imported my “Active Directory” Module.
Get-Command –Module ActiveDirectory
So here is our all Active Directory Related Cmdlets.



How to know cmdlet belong to whcih module


内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  Powershell