Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 10 Next »

Prerequisites

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

 Common PowerShell module names

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 loaded PowerShell modules:

$Loaded = Get-Module -Name $PowerShellModuleName

Run the following commands to locate the installed PowerShell modules

$Installed = Get-Module -Name $PowerShellModuleName -ListAvailable

Run the following commands to unload the PowerShell modules

If ($Loaded) { Remove-Module -Name $PowerShellModuleName -Force }

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

If ($Installed) { Update-Module -Name $PowerShellModuleName } Else { Install-Module -Name $PowerShellModuleName }

  • No labels