4

Delete a user from Deleted Users in Office 365

 3 years ago
source link: https://www.ramblingtechie.co.uk/2021/07/02/delete-a-user-from-deleted-users-in-office-365/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Delete a user from Deleted Users in Office 365

When you delete a user in Office 365, it adds the user to “Deleted Users” for 30 days meaning you can’t reuse the UPN/username during this time. It is possible to delete a user from Deleted Users in Office 365, however it does require Powershell.

You will require Azure Active Directory Module for Windows PowerShell to be installed on your computer to do this – see how to install it here.

Delete a user from Deleted Users in Office 365
  1. Connect to MSOnline by running the below command and entering your administrator username and password when requested.
    Connect-MsolService
  2. (Optional) Run the following command to see a list of users currently in Deleted Users.
    Get-MsolUser -ReturnDeletedUsers
  3. Finally run the following (adjusting the [email protected] with the user you want to remove) to completely delete a user form deleted users in Office 365. Be aware this is irreversible once run, so be certain you want to completely remove the account before doing so.
    Remove-MsolUser -UserPrincipalName [email protected] -RemoveFromRecycleBin

The user will now be completely removed. To remove all users that are currently in deleted users, run the following command:

Get-MsolUser -ReturnDeletedUsers | Remove-MsolUser -RemoveFromRecycleBin -Force

Removing -Force from the end will result in you being asked to confirm each deletion.

Like this:

Loading...

Posted in Uncategorized


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK