温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

Exchange刷新已禁用邮箱状态

发布时间:2020-06-21 05:12:06 来源:网络 阅读:1878 作者:kangl 栏目:系统运维

刷新已禁用用户邮箱状态

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

当用户邮箱被禁用后,需要过一段时间该用户邮箱才会出现在“已断开连接”的邮箱中,默认EX最长刷新周期为24小时,通过下面命令可以强制刷新该用户邮箱状态,之后就可以在EXchange管理页面重新链接该邮箱。

复制代码

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

#先确认是否有重名

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

复制代码

#下面命令刷新该邮箱数据库中所有用户邮箱状态

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

#当用户邮箱已被禁用,其disconnectreason为空,可以直接链接邮箱(未测试)

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

==============================================================

本示例将连接链接的邮箱。Identity 参数指定 Exchange 数据库中断开连接的邮箱。 LinkedMasterAccount 参数指定帐户林中要将邮箱重新连接到的 Active Directory 用户帐户。 Alias 参数指定重新连接的邮箱的别名;别名是电子邮件地址中 @ 符号左侧的部分。

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

此示例将连接用户邮箱。Identity 参数指定 Exchange 数据库中断开连接的邮箱。 User 参数指定要将邮箱重新连接到的 Active Directory 用户帐户。

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

向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI