Scenario: When you delete the user(s) in O365 and they move into the Deleted Users section. Now you need to delete them permanently.
Procedure: Below are the steps to delete the user permanently:
Steps:
1. Run PowerShell as an administrator on the server where AD Connect is installed or from your machine/ device and connect with MsolService.
2. If you don't have the required module, you can install it by running the PowerShell command below:
Install-Module MSOnline
Then run the below PowerShell commands:
Import-Module MSOnline
Connect-MsolService
Optional: You can check all the deleted users that are in the O365 deleted users bin by running the below PowerShell command:
Get-MsolUser -ReturnDeletedUsers
You can remove a specific deleted user permanently from the deleted/recycle bin section from the O365 cloud:
Remove-MsolUser -UserPrincipalName Lynn@office365bootcamp.com -RemoveFromRecycleBin
After running the above command you will see the below:
Get-MsolUser -ReturnDeletedUsers | Remove-MsolUser -RemoveFromRecycleBin -Force
Comments
0 comments
Please sign in to leave a comment.