【问题标题】:How do you screen for legacy or linked mailboxes?您如何筛选旧邮箱或链接邮箱?
【发布时间】:2010-10-06 01:51:53
【问题描述】:

我注意到,当我打开 Exchange 管理控制台时,它会将具有“收件人类型详细信息”的邮箱显示为旧邮箱。

如何查询哪些是旧邮箱、用户邮箱或链接邮箱?

我试过了

get-mailbox -identity <displayname> | select deleteditemflags 

但这似乎不起作用。

【问题讨论】:

    标签: exchange-server exchange-management-shell


    【解决方案1】:

    这将为您提供所有旧版或链接邮箱:

    Get-Mailbox -resulteSize unlimited -RecipientTypeDetails LegacyMailbox,LinkedMailbox
    

    仅限一位用户:

    Get-Mailbox -Identity userName -RecipientTypeDetails LegacyMailbox,LinkedMailbox
    

    编辑:
    获取所有邮箱名称和类型

    Get-Mailbox | Format-Table Name,RecipientTypeDetails
    

    【讨论】:

    • 如何过滤掉被墓碑(标记为删除)的用户以供以后清除?
    【解决方案2】:

    您可以通过 Get-MailboxStatistics 获取已禁用和软删除的邮箱。有关详细信息,请参阅此链接: https://technet.microsoft.com/en-us/library/mt577269(v=exchg.160).aspx

    要找到硬删除的邮箱,您必须寻找墓碑:

    var path = "GC://{YourGlobalCatalogFQDN}";
    var root = new DirectoryEntry(path, username, password);
    var filter = "(objectClass=person)(isDeleted=TRUE)(msExchMailboxGuid=*)(cn=*)";          //tombstone mailboxes don't have 'objectCategory' property
    var props = "objectClass sAMAccountName objectGUID msExchMailboxGuid cn whenChanged isDeleted".Split(' ');   //tombstone mailboxes don't have 'mail' property
    var ds = new DirectorySearcher(root, filter, props, SearchScope.Subtree);
    ds.Tombstone = true;
    using (var mailboxes = ds.FindAll())
    {
        foreach (SearchResult mailbox in mailboxes)
        { ... }
    }
    

    【讨论】:

      猜你喜欢
      • 2020-08-14
      • 1970-01-01
      • 2010-09-11
      • 1970-01-01
      • 1970-01-01
      • 2014-12-29
      • 2018-09-02
      • 2015-01-30
      • 2013-08-15
      相关资源
      最近更新 更多