Connect to Exchange Online PowerShell
Exchange Online PowerShell Modunle
You need install Exchange Online module only once. In the next time, run to connect to Exchange Online PowerShell.
1. Connect to Exchange Online PowerShell
##Connect to Exchange Online Powershell.
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope LocalMachine -Force;
Install-PackageProvider -Name NuGet -Force;
Set-PSRepository -Name "PSGallery" -InstallationPolicy Trusted;
Install-Module -Name ExchangeOnlineManagement;
Import-Module ExchangeOnlineManagement;
Connect-ExchangeOnline;
2. Get user information
Get-User adelev@leoguides.info | Select-Object Name,*Recipient*
3. Clear previous mailbox info
Run the cmdlet including parameter to delete the mailbox in the cloud. Type Y and press Enter.
Set-User adelev@leoguides.info -PermanentlyClearPreviousMailboxInfo
The mailbox is successfully deleted and the user identity is still available in the cloud.
4.5/5 - (4 votes)