zoukankan      html  css  js  c++  java
  • 刷新已禁用用户邮箱状态

    Get-MailboxDatabase | Get-MailboxStatistics | Where { $_.DisplayName -eq "白娟" } | 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"


  • 相关阅读:
    转:iphone 申请证书
    [C#] Window Form 事件順序
    探讨PHP获取checkbox值
    PHP判断字符串的包含
    PCCSRGB变换表
    21世纪初最有影响力的20篇计算机视觉期刊论文
    Win7 64bit下MexOpenCV的安装,Matlab和C++&OpenCV的完美结合
    Comics: do we know that we are not doing research in the wrong way?
    Deep Learning at NIPS2012
    21世纪初最有影响力的30篇计算机视觉会议论文
  • 原文地址:https://www.cnblogs.com/dreamer-fish/p/4648357.html
Copyright © 2011-2022 走看看