Bulk remove user from Office 365

Prepare a CSV File to Import New Exchange Online Users:

You can refer to the steps below to bulk remove the users:
1.Create a CSV file that contains all the users you want to remove:
The CSV file should include the five required attributes: Name, EmailAddress, FirstName, LastName, Password.


2.Install and Configure Windows PowerShell
3.Connect Windows PowerShell to the Service
4.Run the command below:
$users =Import-Csv C:\Users\...\Desktop\Password.csv
$users | ForEach-Object {Remove-Mailbox –Identity $_.EmailAddress}

Note : You should find the path of the CSV file, and use the path instead of C:\Users\...\Desktop\.

Comments (0)

Skip to main content