Microsoft 365

In the midst of a migration to Office 365 recently, I needed to re-do some work, which required re-creating some accounts. Deleting accounts is easy enough, but the recreation failed because the accounts still existed. Office 365 has a recycle bin that automatically removes items after 30 days. If you need to clean it out a bit faster, there is a way.

First, be sure to grab the latest “Microsoft Online Services Module for Windows Powershell” (MSOL Module PowerShell): https://www.microsoft.com/en-us/download/details.aspx?id=35588

Then, Set-executionpolicy unrestricted

Connect to Office 365: Connect-MSOLService

Once connected, Get-MsolUser –ReturnDeletedUsers will show all the users in the Recycle Bin and Remove-MsolUser – [email protected] – RemoveFromRecycleBin will remove individual. If you want to remove everything from the Recycle Bin, can you pipe one to the other: Get-MsolUser –ReturnDeletedUsers | Remove-MsolUser –RemoveFromRecycleBin.

Now your Office 365 recycle bin is empty and you can get back to your transition to the Cloud.

Shane Skriletz, PEI

Dataprise

Dataprise is a national managed service provider that believes that technology should enable our clients to be the absolute best at what they do.

Let’s talk IT.

Request a consultation. Tell us where your offices are and one of our engineers will be in touch within one business day — no sales script, no obligation, just a working conversation about what you’re trying to do.

cyber insurance

"*" indicates required fields

This field is for validation purposes and should be left unchanged.
Your Name*