Forum Discussion
IanaMac
Jul 24, 2020Brass Contributor
Permanently delete users mailbox and archive mail boxes
I need a PS script that will permanently delete a list of Users Mailboxes and the associated Archive mailbox for the same users. All these users are in Specific AD OU's if that helps but i obviously...
IanaMac
Jul 27, 2020Brass Contributor
DeepakRandhawa Sorry I am talking about on prem exchange 2013. 🙂
DeepakRandhawa
Jul 27, 2020Iron Contributor
Okay, this should remove mailboxes
Import-Csv C:\Contacts.csv | ForEach { Disable-Mailbox $_.EmailAddress }
if you are prompted to confirm for every mailbox just add -confirm:$false
Import-Csv C:\Contacts.csv | ForEach { Disable-Mailbox $_.EmailAddress }
if you are prompted to confirm for every mailbox just add -confirm:$false
- IanaMacJul 29, 2020Brass Contributor
DeepakRandhawa thanks for this does this also remove the Archive files that are in a separate db?
- DeepakRandhawaJul 29, 2020Iron Contributordisabling primary mailbox also disables archive mailbox