

The cmd above should return a list of installed Exchange Online modules. (Get-Module -ListAvailable -Name ExchangeOnlineManagement) -ne $null You can prevent unnecessary errors by simply verifying that the ExchangeOnlineManagement module is available. With the use of a single cmdlet, we can list all installed modules in PowerShell. Install-Module -Name ExchangeOnlineManagement -Force Automatically check if EXO Module is installedĪre you going to use the Exchange Online module in a script? Then make sure you automatically check if the module is installed before your try to connect. # Add -Force to it when you need to update EXO V1. We can now install the latest Exchange Online PowerShell module with the Install-Module cmdlet Install-Module -Name PowerShellGet -Force # Close and re-open your PowerShell window when done

We need to install PowerShellGet before we can install the EXO V3 Module. Again open an Elevated Windows PowerShell window: We need to install the EXO V3 Module in PowerShell before we can connect to Exchange Online. Install the Exchange Online V3 Module in PowerShell Provide a valid certificate with which to sign the files. If haven’t set the execution policy and try to connect to Exchange Online you will get an error:įiles cannot be loaded because running scripts is disabled on this system. You only need to set this once per computer. Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser

