Install PowerShell module from PSGallery

Prerequisites

The PowerShellModuleName variable must already be defined or one of the following values must be set:

Exchange Online

$PowerShellModuleName = 'ExchangeOnlineManagement'

Install the PowerShell module

Run the following commands to verify the NuGet provider is installed:

Find-PackageProvider -Name 'NuGet' -Force -ForceBootstrap

Run the following commands to trust the PSGallery:

Set-PSRepository -Name 'PSGallery' -InstallationPolicy Trusted

Run the following commands to locate the active PowerShell modules:

Run the following commands to locate the installed PowerShell modules

Run the following commands to unload the PowerShell modules

Run the following commands to update or install the latest version of the PowerShell modules from the PSGallery: 

Â