Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Expand
titleCommon PowerShell module names
Info

Exchange Online

Code Block
languagepowershell
$PowerShellModuleName = 'ExchangeOnlineManagement'

...

Run the following commands to locate any installed instance of the active PowerShell modules: module

Code Block
languagepowershell
$ModuleIsActive$ModuleIsInstalled = Get-Module -Name $PowerShellModuleName -ListAvailable

Run the following commands to locate any active instance of the installed PowerShell modules module:

Code Block
languagepowershell
$ModuleIsInstalled$ModuleIsActive = Get-Module -Name $PowerShellModuleName -ListAvailable

Run the following commands to unload any active instance of the PowerShell modulesmodule

Code Block
languagepowershell
If ($ModuleIsActive) { Remove-Module -Name $PowerShellModuleName -Force }

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

Code Block
languagepowershell
If ($ModuleIsInstalled) { Update-Module -Name $PowerShellModuleName -Verbose } Else { Install-Module -Name $PowerShellModuleName -Verbose }