PowerShell for Microsoft 365 lets you manage your Microsoft 365 settings from the command line. Connecting to PowerShell is a simple process where you install the required software and then connect to your Microsoft 365 organization.
ps>Install-Module MSOnline
ps>Connect-MsolService
ps>Install-Module -Name ExchangeOnlineManagement -RequiredVersion 2.0.3
ps>Set-ExecutionPolicy unrestricted
ps>
Import-Module ExchangeOnlineManagement
$UserCredential = Get-Credential
Connect-ExchangeOnline -Credential $UserCredential -ShowProgress $true
ps>Get-Mailbox