disturbedone
Vendor
Is it possible to use the Get-MailboxStatistics command to display the username rather than the display name?
The following command creates a text file with 3 columns - DisplayName, TotalItemSize(KB) and ItemCount
But I'd really like to have the AD username/alias too. Like the following:
But I can't work out how to do it. I don't actually think it's possible but thought I'd ask. The reason I don't think it's possible is that the only field I can find that's close is LegacyDN but that has a result such as /O=MY COMPANY/OU=EXCHANGE ADMINISTRATIVE GROUP (FYDIBOHF23SPDLT)/CN=RECIPIENTS/CN=SMITHJOHN.
Anyone know if this is possible and how to do it? Or is it just not possible?
The following command creates a text file with 3 columns - DisplayName, TotalItemSize(KB) and ItemCount
Code:
Get-MailboxStatistics -database "DBname"| Sort-Object TotalItemSize -descending | ft DisplayName,@{label="TotalItemSize(KB)";expression={$_.TotalItemSize.Value.ToKB()}},ItemCount > C:\reports\mailboxes_DBname.txt
Code:
DisplayName TotalItemSize(KB) ItemCount
----------- ----------------- ---------
John Smith 6201952 122050
John Doe 5290027 58027
Jane Doe 4235569 81128
But I'd really like to have the AD username/alias too. Like the following:
Code:
Username DisplayName TotalItemSize(KB) ItemCount
---------- ----------------- --------- ----------
SMITHJOHN John Smith 6201952 122050
DOEJOHN John Doe 5290027 58027
DOEJANE Jane Doe 4235569 81128
But I can't work out how to do it. I don't actually think it's possible but thought I'd ask. The reason I don't think it's possible is that the only field I can find that's close is LegacyDN but that has a result such as /O=MY COMPANY/OU=EXCHANGE ADMINISTRATIVE GROUP (FYDIBOHF23SPDLT)/CN=RECIPIENTS/CN=SMITHJOHN.
Anyone know if this is possible and how to do it? Or is it just not possible?