Maintain control of your Microsoft 365 data
Post Reply
cerberus
Expert
Posts: 164
Liked: 17 times
Joined: Aug 28, 2015 2:45 pm
Full Name: Mirza
Contact:

How to use Export-VEXItem to export primary and archive mailbox?

Post by cerberus »

Hello,

Using latest VBO O365.

Trying to automate exporting of PST data for user primary (isArchive:False) and archive (isArchive:True) mailbox.

Code: Select all

Connect-VBOServer -Server xxxxx
$organization = Get-VBOOrganization -Name "xxxxx"
Start-VBOExchangeItemRestoreSession -LatestState -Organization $organization
$session = Get-VBOExchangeItemRestoreSession
$database = Get-VEXDatabase -Session $session
$mailboxes = Get-VEXMailbox -Database $database
$mailbox = Get-VEXMailbox -Database $database -name xxxxx
Export-VEXItem -Mailbox $mailbox -To "Z:\xxxxx.pst"
The issue is, running Export-VEXItem will try to dump both primary/archive into a single PST using above cmdlet.

PS C:\Windows\system32> $mailbox
Id : 1ca75408-d47a-4475-af18-xxxxx
Name : In-Place Archive - xxxxx
Email : xxxxx
IsDeleted : False
IsArchive : True

Id : 340903b2-ff62-49f5-ba47-xxxxx
Name : xxxxx
Email : xxxxx
IsDeleted : False
IsArchive : False

This does not seem to work, we get an error..

Code: Select all

Export-VEXItem : Cannot convert 'In-Place Archive - xxxxx' to the type 'Veeam.Exchange.PowerShell.Model.Items.VEXMailbox' required by parameter 'Mailbox'. Specified method is not supported.
At line:1 char:25
+ Export-VEXItem -Mailbox $mailbox -To "C:\IT\xxxxx.pst" -Verbose
+                         ~~~~~~~~
    + CategoryInfo          : InvalidArgument: (:) [Export-VEXItem], ParameterBindingException
    + FullyQualifiedErrorId : CannotConvertArgument,Veeam.Exchange.PowerShell.Cmdlets.Export.ExportVEXItem
If I modify $mailbox to not include the in-place archive, then Export-VEXitem works.

How does one export in-place archive?

Is there a way to run Export-VEXItem so it does not lock up the PowerShell session (ie. run as background job)?
cerberus
Expert
Posts: 164
Liked: 17 times
Joined: Aug 28, 2015 2:45 pm
Full Name: Mirza
Contact:

Re: How to use Export-VEXItem to export primary and archive mailbox?

Post by cerberus »

Case #05120897
Polina
Veeam Software
Posts: 3191
Liked: 774 times
Joined: Oct 21, 2011 11:22 am
Full Name: Polina Vasileva
Contact:

Re: How to use Export-VEXItem to export primary and archive mailbox?

Post by Polina »

Hi Mirza,

Export to PST is supported either per-mailbox or for the entire store (i.e. all mailboxes in a backup). Exporting several selected mailboxes is not possible.
Thus, for an archive mailbox, you need to start a separate task.
Post Reply

Who is online

Users browsing this forum: praveen.sharma and 15 guests