To run this script, is need PowerShell 3.0 or higher. If you have Windows 8, 8.1 or 10, you already have installed. If you have an earlier version of Windows, we need this download and install PowerShell 3.0.

 

By default, PowerShell does not run scripts from third parties who have been able to be downloaded from internet. If this is the first time, you must change the execution policy to run this script. Run PowerShell as administrator and launch this command:

Set-ExecutionPolicy Unrestricted -Force

Note: If you need more information about execution policies, here you can read more: https://technet.microsoft.com/en-us/library/ee176961.aspx

 

When you run the script, you first have to enter administrator credentials tenant

 

It is very easy, already you are connected to Exchange Online and you can run cmdlets!