Motivation: Making the Systems Engineers life easier.

Purge disconnected mailboxes in exchange 2013

Microsoft Exchange

Purge disconnected mailboxes in exchange 2013

[PS] C:\Windows\system32>Get-MailboxDatabase | Get-MailboxStatistics | Where { $_.DisconnectReason -eq “Disabled” } | fl  DisplayName, mailboxguid,database,DisconnectDate

DisplayName    : Name of the User
MailboxGuid    : 8071dcfc-0288-4218-99fa-6ece4f832b08
Database       : MailboxDatabase0051256
DisconnectDate : 9/20/2016 3:59:40 PM

[PS] C:\Windows\system32>Remove-StoreMailbox -Database MailboxDatabase0051256 -Identity “8071dcfc-0288-4218-99fa-6ece4f832b08” -MailboxState Disabled

Confirm
Are you sure you want to perform this action?
Removing mailbox “8071dcfc-0288-4218-99fa-6ece4f832b08” on database “MailboxDatabase0051256”.
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [?] Help (default is “Y”): a
[PS] C:\Windows\system32>

Leave your thought here

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Topics