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:
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.