Connect Office 365 using Powershell to Purge Deleted Users

If ever encounter the need to remove deleted users in office 365 urgently, can try the step below.

1. Launch Microsoft Azure Active Directory Module for Windows Powershell in administrator mode.

2. Enter the line Connect-MsolService to login.

If encounter issue can’t login, try to download and update from the url belows:

Microsoft Online Services Sign-In Assistant

Windows Azure Active Directory Module for Windows PowerShell/span>

3. Once logged in, enter the line Get-MsolUser -ReturnDeletedUsers to get the list of users that’s deleted.

4. Enter the line Remove-MsolUser -UserPrincipalName user@domain.com -RemoveFromRecycleBin to permanently remove the deleted user. Be cautious as this step is irreversible, so carefully type the user name.


Disqus Comments Loading...