Share via

Generating report HTML with two Exchanges

dss ds 531 Reputation points
2022-07-13T09:01:11.13+00:00

I have two exchanges installed in same AD.. Not sure if this a direct result of the output, but after using Get-MailboxServer cmdlet, some Users mailboxes are doubled up in the resulting HTML file

Get-MailboxServer | Get-MailboxStatistics | select displayname,itemcount,totalitemsize | sort totalitemsize -desc | ConvertTo-HTML -head "<title>Mailbox Size Report</title>" | Out-File C:\Test.htm

My user-created mailboxes are: User3, User4, and User6. Mailboxes are all on MB1 (Exchange#1), except for User4 is on MB2 (Exchange#2)

However, after generating HTML report via above command, "User4" is doubled-up.. and there is no sign of User6 at all.

Apart from that, everything appears got be the same..

Any reason for this duplication? At first i thought one of the "User4" dupe' was actually User6, but the item count is different, and since i don't have any emails in this mailbox, I ruled that out..

Any ideas?

Exchange | Exchange Server | Management
Exchange | Exchange Server | Management

The administration and maintenance of Microsoft Exchange Server to ensure secure, reliable, and efficient email and collaboration services across an organization.


Answer accepted by question author

Joyce Shen - MSFT 16,706 Reputation points
2022-07-18T07:13:51.127+00:00

Hi @dss ds

This seems to be the expected behavior, you could refer to the below links which discussed the similar question:

Please Note: Since the web site is not hosted by Microsoft, the link may change without notice. Microsoft does not guarantee the accuracy of this information.

It's because the mailbox is just soft deleted after the move. See:
When mailboxes are moved from an Exchange database to any other database, Exchange doesn't fully delete the mailbox from the source database immediately upon completion of the move. Instead, the mailbox in the source mailbox database is switched to a soft-deleted state. Mailbox data can be accessed during a mailbox restore operation using the MailboxRestoreRequest cmdlet set. The soft-deleted mailboxes are retained in the source database until either the deleted mailbox retention period expires or you use the Remove-StoreMailbox cmdlet to purge the mailbox.


If an Answer is helpful, please click "Accept Answer" and upvote it.

Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

Was this answer helpful?

0 comments No comments

1 additional answer

Sort by: Most helpful
  1. dss ds 531 Reputation points
    2022-07-14T09:30:24.133+00:00

    Get-MailboxServer does return User6 in the results..

    The reason why it wasn't included in the report was because i didn't log onto mailbox yet.

    One problem solved.

    However, I still see two User4's in generated report, despite being one User4 mailbox. This is the only mailbox moved to MB2 (2nd exchange) .. Perhaps the reporting is getting confused? I think that may be the problem.

    I think i found out the duplicate mailboxes too.

    User4 on moved on MB2 and doubled in report,
    I them moved over User6, and generated report again... This time i also get User6 doubled up as well..

    So the fact of moving mailboxes between Exchanges on same AD doubles up mailbox in generated report..

    Is this expected behavior? and would this happen if its wasn't on same AD? I don''t think it would.

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.