question

47451047 avatar image
0 Votes"
47451047 asked 47451047 commented

Exchange move archive mailbox.

Hi.

https://docs.microsoft.com/ru-ru/powershell/module/exchange/get-moverequest?view=exchange-ps

I don't understand the difference between -ArchiveOnly and -ArchiveTargetDatabase

Can you give examples?

  1. How to transfer only an archive box to another database.

  2. How to transfer only archive boxes from the entire database to another database

office-exchange-server-mailflow
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

AshokM-8240 avatar image
0 Votes"
AshokM-8240 answered 47451047 commented

Hi @47451047 ,

-ArchiveOnly is used to move only the archive mailbox.
-ArchiveTargetDatabase - This is used to specify the mailbox database for the archive mailbox to be moved.

Usually there will be 2 mailbox databases - one for primary and one for archive. If the -ArchiveTargetDatabase is not specified then the archive mailbox will be moved to the mailbox database where the primary mailbox is hosted.

1. How to transfer only an archive box to another database.

You can use New-MoveRequest -Identity "username" -ArchiveOnly -ArchiveTargetDatabase "DBName"

2. How to transfer only archive boxes from the entire database to another database

You can use Get-Mailbox -Database "DBName" -ArchiveOnly | New-MoveRequest -ArchiveOnly -ArchiveTargetDatabase "DBName"

https://docs.microsoft.com/en-us/powershell/module/exchange/new-moverequest?view=exchange-ps

If the above suggestion helps, please click on "Accept Answer" and upvote it.

· 10
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.


Why can't I do this?: Get-Mailbox -Database "DBName" -ArchiveOnly | New-MoveRequest -ArchiveOnly TargetDatabase "DBName" ?

the archive database is no different from the usual

0 Votes 0 ·

Archive database is also another mailbox database but the only difference is that it will host only the archive mailboxes. You can use those commands to move the archive mailboxes to the target archive database.

0 Votes 0 ·

AshokM-8240, thank you ! Help a little more pls.

How i can:

  1. Delete the user archive mailbox.

  2. Delete archive mailbox for all users from a specific database

  3. Connect a new archive mailbox to a specific user

  4. Connect a new archive mailbox to all users from a specific database


0 Votes 0 ·

1. Delete the user archive mailbox.

You can disable it using EAC or EMS
https://docs.microsoft.com/en-us/exchange/policy-and-compliance/in-place-archiving/manage-archives?view=exchserver-2019#disable-an-archive-mailbox

2. Delete archive mailbox for all users from a specific database
You can filter using EAC or EMS

3. Connect a new archive mailbox to a specific user

If its new archive, then it has to be enabled. If you mean connect from disabled or disconnected archive mailbox then you can use Enable-Mailbox, Enable-Mailbox "Name" -Archive
If it doesn't work then try Connect-Mailbox

4. Connect a new archive mailbox to all users from a specific database
Get the list of all disconnected/disabled archive mailbox for that database using
Get-MailboxDatabase "xxx" | Get-MailboxStatistics | Where {($.DisconnectDate -ne $null) -and ($.IsArchiveMailbox -eq $true)} | Format-List

Then using CSV you can enable or re-connect them


1 Vote 1 ·

Hi @47451047

Glad to hear your question has been answered!

Just to add a little, if you would like to "Delete archive mailbox for all users from a specific database",
You may use this command to first list all the mailboxes which have archive enabled in the specific database:

 Get-Mailbox -database <specific database> -archive

And run this command to disable the archive mailboxes:

  Get-Mailbox -database <specific database> -archive | Disable-Mailbox -archive
1 Vote 1 ·

KaelYao-MSFT, thank you !

I have 20 new bases for archive mailboxes.

I need to create archive boxes in these databases.

How can I evenly, in random order, distribute archive boxes among the databases?

0 Votes 0 ·

Hi,

Did you mean besides the databases which are currently hosting the mailboxes, you also have 20 new databases supposed to be used for archive mailboxes?
If so, I suppose that you may need to write a script to achieve this goal.
While, currently this is not supported in our forum.

Besides, you may use this command (add the -archivedatabase parameter to specific the database) when you create the archive mailboxes:

 Enable-Mailbox -identity <user name> -archive -archivedatabase <specific database>

And run this command to check the database of the archive mailboxes:
(database is the database of the primary mailbox and archivedatabase is the database of the archive mailbox )

 Get-Mailbox | where {$_.ArchiveDatabase -ne $null} | select name,database,archivedatabase
0 Votes 0 ·

Blockquote

Did you mean besides the databases which are currently hosting the mailboxes, you also have 20 new databases supposed to be used for archive mailboxes?
If so, I suppose that you may need to write a script to achieve this goal.

Yes.

I don't know powershell well
0 Votes 0 ·

Sorry, but as mentioned in my former reply, currently writing scripts isn't supported in this forum.
Is there anything else I can help you with?

1 Vote 1 ·

No, thanks a lot for your help!

0 Votes 0 ·