If you use The Email Laundry for advanced email and threat protection and your an MSP you will know how time consuming it is to setup.
Adding all the email accounts into The Email Laundry manually, even exporting users from Office 365 to CSV and formatting the import file can be a real pain.
Well I had enough of all the manual work and wrote a little PowerShell script to speed up the process.
Before attempting to run this script please ensure all domains in the Office 365 tenant have been added to your Email Laundry account.
1. Download the following script to the root of your c: drive.
“Many thanks to James Stone at Clovertec for his addition to the script. This version has been updated to include code from his comments at the bottom of this post.. Thanks James!”
2. Open a PowerShell window as ‘Run as administrator’.

Change directory to the root of C.
cd c:\
Then Run the script
.\Export365toLaundry.ps1

3. Sign into your clients tenant as a global admin.

The script will fetch the mailbox and group details and the output should look something like this.

4. You will now find the CSV file ready to import into The Email Laundry.
‘TheEmailLaundryImportFile.csv’

5. Log into The Email Laundry and navigate to Users, click ‘Import Users’.
Click ‘Choose File’ and select the exported CSV file and click ‘Import’.

Please comment below if this was useful to you or if you found any errors in the code.