0

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.

4

2 回答 2

1

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
于 2009-02-07T16:06:37.050 回答
0

您可以通过 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)
    { ... }
}
于 2018-01-30T21:55:12.673 回答