Remove / Purge Deleted Users from Office 365 Admin

Andy

Administrator
You can run the command via AD PowerShell directly:
Code:
$msolcred = get-credential
connect-msolservice -credential $msolcred
To purge the deleted user accounts:
Code:
get-msoluser –returndeletedusers -maxresults 100000 | remove-msoluser -removefromrecyclebin -force
 
Top