How to find which mailbox is the primary mailbox of one specific archive mailbox in Exchange 2013 via PowerShell?
How to find which mailbox is the primary mailbox of one specific archive mailbox in Exchange 2013 via PowerShell?
In Exchange 2013, using Get-MailboxStatistics cmdlet against one mailbox database, I can get a list of mailboxes, including archive mailboxes, in that mailbox database. Base on this list, how can I get its primary mailbox of each archive mailbox? Thanks!
November 18th, 2012 1:25am
Hello,
By default, the display name for archive mailbox is like this "Personal Archive primary mailbox name", so you can get its primary mailbox of each archive mailbox from the display name.
Get-mailboxStatics -Database "Mailbox Database"|fl DisplayName
If you didn't use the default display name for archive mailbox, you can use this command to help you find the primary mailbox:
Get-mailbox| where{ $_.ArchiveName -like 'Your Archive mailbox's DisplayName'}
Thanks,
Evan Liu
TechNet Subscriber Support in forum
If you have any feedback on our support, please contact
tnmff@microsoft.com
Evan Liu
TechNet Community Support
Free Windows Admin Tool Kit Click here and download it now
November 19th, 2012 4:35am
Hello,
By default, the display name for archive mailbox is like this "Personal Archive primary mailbox name", so you can get its primary mailbox of each archive mailbox from the display name.
Get-mailboxStatics -Database "Mailbox Database"|fl DisplayName
If you didn't use the default display name for archive mailbox, you can use this command to help you find the primary mailbox:
Get-mailbox| where{ $_.ArchiveName -like 'Your Archive mailbox's DisplayName'}
Thanks,
Evan Liu
TechNet Subscriber Support in forum
If you have any feedback on our support, please contact
tnmff@microsoft.com
Evan Liu
TechNet Community Support
November 19th, 2012 4:35am
Thanks Evan! Yes, it works.
But there has one scenario, if each user mailbox has one associated archive mailbox and I only have a list of all archive mailboxes, to find each primary mailbox for each archive mailbox, the time complexity of your solution will be O(n^2).
The solutoin what I want to find is O(1), just like from primary mailbox to find associated archive mailbox the time complexity is O(1). Is there has such similar cmdlet, from archive mailbox to find primary mailbox, in Exchange Server
2013?
Free Windows Admin Tool Kit Click here and download it now
November 20th, 2012 6:16am
Thanks Evan! Yes, it works.
But there has one scenario, if each user mailbox has one associated archive mailbox and I only have a list of all archive mailboxes, to find each primary mailbox for each archive mailbox, the time complexity of your solution will be O(n^2).
The solutoin what I want to find is O(1), just like from primary mailbox to find associated archive mailbox the time complexity is O(1). Is there has such similar cmdlet, from archive mailbox to find primary mailbox, in Exchange Server
2013?
November 20th, 2012 6:16am
Hello,
You can follow this way to list all the primary mailbox name and archive mailbox name:
$MailboxGuids=(Get-MailboxStatistics -Database "Archive mailbox Database").MailboxGuid
Foreach($MailboxGuid in $MailboxGuids){
Get-Mailbox| where{$_.ArchiveGuid -eq $MailboxGuid}|fl DisplayName, ArchiveName
In this script, it will return all the primary mailbox name and archive mailbox name for all the archive mailboxes on that archive mailbox database.
Thanks,
Evan Liu
TechNet Subscriber Support in forum
If you have any feedback on our support, please contacttnmff@microsoft.comEvan Liu
TechNet Community Support
Free Windows Admin Tool Kit Click here and download it now
November 21st, 2012 1:32am
Hello,
You can follow this way to list all the primary mailbox name and archive mailbox name:
$MailboxGuids=(Get-MailboxStatistics -Database "Archive mailbox Database").MailboxGuid
Foreach($MailboxGuid in $MailboxGuids){
Get-Mailbox| where{$_.ArchiveGuid -eq $MailboxGuid}|fl DisplayName, ArchiveName
In this script, it will return all the primary mailbox name and archive mailbox name for all the archive mailboxes on that archive mailbox database.
Thanks,
Evan Liu
TechNet Subscriber Support in forum
If you have any feedback on our support, please contacttnmff@microsoft.comEvan Liu
TechNet Community Support
November 21st, 2012 1:32am
How to find which mailbox is the primary mailbox of one specific archive mailbox in Exchange 2013 via PowerShell
Hi,
This will give you the list of all Archive Mailboxes in database DB01 and where the primary mailbox is stored.
Get-Mailbox -Archive -Database DB01 | ft Name,Database,ArchiveName,Archivedatabase
Martina Miskovic
Free Windows Admin Tool Kit Click here and download it now
November 23rd, 2012 11:49pm
How to find which mailbox is the primary mailbox of one specific archive mailbox in Exchange 2013 via PowerShell
Hi,
This will give you the list of all Archive Mailboxes in database DB01 and where the primary mailbox is stored.
Get-Mailbox -Archive -Database DB01 | ft Name,Database,ArchiveName,Archivedatabase
Martina Miskovic
November 23rd, 2012 11:49pm