Tuesday, February 13, 2018

Get Module Commands

In PowerShell, modules are packages of commands, functions, and scripts, often around a theme, like the Registry or Active Directory. To see what modules are loaded in our PowerShell session, use the Get-Module cmdlet

Get-Module




There may be other modules available but which haven't been imported yet. We can add the -ListAvailable switch to see them:

Get-Module -ListAvailable




To see what commands come with a module, we can use the Get-Command cmdlet and specify the module:

Get-Command -Module <module-name>

 
  
 
Once we've decided we want to actually use the commands in the module, we can Import them with Import-Module:

Import-Module -Name <module-name>

 
 

No comments:

Post a Comment