Duplicates
Hello,
I use Exhcange 2007 and I run the below command to generate a report on mailboxes:
Get-MailboxStatistics | Sort-Object TotalItemSize -Descending | ConvertTo-HTML -head $a -property DisplayName, @{l="TotalItemSize(KB)";expression={$_.TotalItemSize.Value.ToKB()}},ItemCount | Out-File c:\scripts\mailboxes.htm
EG:
DisplayName
ItemCount
StorageLimitStatus
Last
LogonTime
-----------
---------
------------------
----
---------
GRAIG
5146
10/09/2010
23:06:43
GRAIG
2880
BelowLimit
27/10/2010
14:46:17
Would you know any ways to remove duplicate. Note that it appears only for some users (30 duplicate out of 600) when I check on EMC I don't have the duplicate user.
Thanks,
Graig
October 27th, 2010 9:03am
Not tested (don't have any 2007 mailboxes left) but maybe worth a try:
Get-MailboxStatistics |? {!($_.DisconnectDate)} | Sort-Object TotalItemSize -Descending | ConvertTo-HTML -head $a -property DisplayName, @{l="TotalItemSize(KB)";expression={$_.TotalItemSize.Value.ToKB()}},ItemCount | Out-File c:\scripts\mailboxes.htm[string](0..33|%{[char][int](46+("686552495351636652556262185355647068516270555358646562655775 0645570").substring(($_*2),2))})-replace " "
Free Windows Admin Tool Kit Click here and download it now
October 27th, 2010 10:03am
Thanks Mjolinr it has removed my duplicated users!! :D
October 28th, 2010 8:03am
Cool! I believe the duplicates were disconnected mailboxes left over from move-mailbox operations that haven't been purged yet.[string](0..33|%{[char][int](46+("686552495351636652556262185355647068516270555358646562655775 0645570").substring(($_*2),2))})-replace " "
Free Windows Admin Tool Kit Click here and download it now
October 28th, 2010 8:35am