Powershell

Table of contents

  1. Powershell
    1. Module Management
      1. Install module
      2. Uninstall module
      3. List all installed modules on the computer
      4. List modules imported in the current session
      5. Load a module

Module Management

Install module

Downloads one or more modules from a repository, and installs them on the local computer.

Install-Module <module name> (-force)

More info and examples: Install-Module (PowerShellGet) - PowerShell

Uninstall module

Uninstalls a module.

Uninstall-Module <module name>

More info and examples: Uninstall-Module (PowerShellGet) - PowerShell

List all installed modules on the computer

List the modules that can be imported from the PSModulePath.

Get-Module -ListAvailable

Search for an installed module with a specific name

Get-Module -ListAvailable | Where-Object {$_.Name -like '*Exchange*'}

List modules imported in the current session

List the modules imported in the current session

Get-Module

More info and examples: Get-Module (Microsoft.PowerShell.Core) - PowerShell

Load a module

Adds modules to the current session.

Install-Module -Name <module name>

More info and examples: Import-Module (Microsoft.PowerShell.Core) - PowerShell