You can manage Exchange Online through Powershell in a similar fashion as you would an on-premise Exchange. There are some differences between available cmdlets and what they do between on-premise Exchange and Exchange Online, but the majority are the same.
Using PS remoting, the cmdlets for Exchange Online are imported through the internet, so first, you need to change the Powershell execution policy to allow remotely signed modules to be loaded. In an elevated Powershell, run this:
Set-ExecutionPolicy RemoteSigned
This prevents errors about not being digitally signed during import. If the above command is not accepted, you probably don't have admin privileges. Either use an elevated Powershell or ask your network administrator to enable it for you.
To make the actual connection, run these in a regular Powershell:
$cred = Get-Credential $office365 = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell/ -Credential $cred -Authentication Basic –AllowRedirection Import-PSSession $office365
This will start to import several modules, adding the required cmdlets to your session. When completed without errors, the Exchange management cmdlets will be available. These are roughly the same as on a on-premise Exchange server.
« ‹ | November 2024 | › » | ||||
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
1 | 2 | |||||
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |