我注意到,当我打开exchange管理控制台时,它将具有“收件人类型详细信息”的邮箱显示为传统邮箱。
如何查询哪些是旧邮箱、用户邮箱或链接邮箱?
我试过了
get-mailbox -identity <displayname> | select deleteditemflags 但这似乎并不管用。
发布于 2009-02-07 16:06:37
这将使您获得所有旧邮箱或链接邮箱:
Get-Mailbox -resulteSize unlimited -RecipientTypeDetails LegacyMailbox,LinkedMailbox只针对一个用户:
Get-Mailbox -Identity userName -RecipientTypeDetails LegacyMailbox,LinkedMailbox编辑:
获取所有邮箱名称和类型
Get-Mailbox | Format-Table Name,RecipientTypeDetails发布于 2018-01-31 05:55:13
您可以通过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)
{ ... }
}https://stackoverflow.com/questions/522648
复制相似问题