如何筛选旧邮箱或链接邮箱?

发布于 2024-07-12 19:41:48 字数 212 浏览 7 评论 0原文

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

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

我已经尝试过

get-mailbox -identity <displayname> | select deleteditemflags 

,但这似乎不起作用。

I've noticed when I pull up exchange management console, it shows mailboxes which have the "Recipient Type Details" as Legacy Mailboxes.

How do I go about querying which ones are legacy, user or linked mailboxes?

I've tried

get-mailbox -identity <displayname> | select deleteditemflags 

but that doesn't seem to work.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

所有深爱都是秘密 2024-07-19 19:41:48

您可以通过 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)
    { ... }
}

You can get Disabled and Soft-Deleted mailboxes via Get-MailboxStatistics. See this link for details:
https://technet.microsoft.com/en-us/library/mt577269(v=exchg.160).aspx

To find hard deleted mailboxes you have to look for a tombstone:

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)
    { ... }
}
┾廆蒐ゝ 2024-07-19 19:41:48

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

Get-Mailbox -resulteSize unlimited -RecipientTypeDetails LegacyMailbox,LinkedMailbox

仅针对一个用户:

Get-Mailbox -Identity userName -RecipientTypeDetails LegacyMailbox,LinkedMailbox

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

Get-Mailbox | Format-Table Name,RecipientTypeDetails

This will get you all Legacy or Linked mailboxes:

Get-Mailbox -resulteSize unlimited -RecipientTypeDetails LegacyMailbox,LinkedMailbox

For just one user:

Get-Mailbox -Identity userName -RecipientTypeDetails LegacyMailbox,LinkedMailbox

EDIT:
Get all mailboxes name and type

Get-Mailbox | Format-Table Name,RecipientTypeDetails
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文