TechShizz | Disabling, Removing and Reconnecting Mailboxes

Disabling, Removing and Reconnecting Mailboxes

Disabling

 

Disabling a mailbox disconnects the mailbox from the user account. 

 

Disable-Mailbox

 

Removing

 

Removing a mailbox disconnects that mailbox from the user account and removes it from Active Directory

 

Remove-Mailbox

 

ReConnect

 

Go to the disconnected mailbox node, find mailbox and right click > connect > Select user account.

 

EMC:

 

Connect-Mailbox –Identity "Jesper Herp" –Database "MBX-DB-ONE" –User "Jesper Herp"

 

 

 

Get all Disconnected Mailboxes

 

$Database = Get-Mailboxdatabase

Get-Mailboxdatabase | Get-MailboxStatistics | Where-Object {$_.DisconnectDate -Notlike $NULL} | FL DisplayName, DisconnectDate, MailboxGuid

 

Take the GIUD of the mailbox to delete:

 

Remove-Mailbox -Database $Database -StoreMailboxIdentity def4aabd-2156-5857-858f-470efc3e6f28

Add comment