Get the App
SLTechnology News&Howtos  ›  Servers  › 

Exchange refresh disabled mailbox status

Shulou Source: shulou.com Published: 2022-06-03 01:41:20 10月04日 Update

Refresh disabled user mailbox status

Get-MailboxStatistics-Database MXDB-NanQu | foreach {Update-StoreMailboxState-Database $_. Database-Identity $_. MailboxGuid-Confirm:$False} Get-MailboxDatabase | Get-MailboxStatistics | Where {$_. DisplayName-eq "test"} | select-Property * Update-StoreMailboxState-Database MB-FSLubao03-Identity 0548a52c-6147-4f87-aea1-b42ac3029925

When a user's mailbox is disabled, it will take a while for the user's mailbox to appear in the disconnected mailbox. The default maximum EX refresh period is 24 hours. You can force the status of the user's mailbox to be refreshed by using the following command, and then you can relink the mailbox on the EXchange management page.

Copy the code

$displayname = "Xiaoming" $w=get-MailboxDatabase | Get-MailboxStatistics | Where {$_ .DisplayName-eq $displayname} $w.database$w.MailboxGuid

# confirm whether there is a duplicate name first

Update-StoreMailboxState-Database $w.database-Identity $w.MailboxGuidget-MailboxDatabase | Get-MailboxStatistics | Where {$_ .DisplayName-eq $displayname} | select disconnectdate,disconnectreason

Copy the code

# the following command refreshes the mailbox status of all users in the mailbox database

Get-MailboxStatistics-Database MXDB-NanQu | foreach {Update-StoreMailboxState-Database $_ .Database-Identity $_ .MailboxGuid-Confirm:$False}

# when the user's mailbox has been disabled and its disconnectreason is empty, you can link the mailbox directly (not tested)

Get-MailboxDatabase-Identity "Databasename" | Get-MailboxStatistics | Where {$_ .Displayname-eq "Display Name"} | Connect-Mailbox-User "Userid"

=

This example connects to a linked mailbox. The Identity parameter specifies the mailbox to which the Exchange database is disconnected. The LinkedMasterAccount parameter specifies the Active Directory user account in the account forest to which you want to reconnect the mailbox. The Alias parameter specifies the alias of the reconnected mailbox; the alias is the part to the left of the @ symbol in the e-mail address.

Connect-Mailbox-Identity "Kai Axford"-Database MBXDB02-LinkedDomainController FabrikamDC01-LinkedMasterAccount kai.axford@fabrikam.com-Alias kaia

This example connects to the user's mailbox. The Identity parameter specifies the mailbox to which the Exchange database is disconnected. The User parameter specifies the Active Directory user account to which you want to reconnect the mailbox.

Connect-Mailbox-Identity "Jeffrey Zeng"-Database MBXDB01-User "Jeffrey Zeng"

Tags: Mailbox user parameter status account data database link code alias command example maximum period address hour time email email symbol Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Technology Xiaomi Redmi vpn Huawei