Jump to content

export mailboxes in exchange 2007 to PST


Recommended Posts

Posted

Hi

 

We are in the process of deleting legacy emails using powershell (any emails before 2008 will be deleted using a script). There is a command I have been attempting to use to export all staff mailboxes onto my local machine just as backup in case things go wrong but seem to be hitting a brick wall.

 

I have tried two different methods to extract mailboxes into PST but I seem to be having some sort of permission issue I think.

 

The first cmd I have run is:

 

Get-Mailbox -Database "name of exchange server\Mailbox Database" | Export-Mailbox -PSTFolderPath F:\PSTs

 

This cmd seems to run and a pst file is created for every user into the folder I specify but the size is always 265kb.

 

I have also tried to run the command based on a organisational unit called staff but it gives me the following error. It says specify a unique value but that OU is unique, I do have other OU's called 'teaching staff' 'office staff' so not sure if this is what it means. Question is how do I ensure I run the command so it is unique?

 

[PS] F:\Documents and Settings\administrator>Get-Mailbox -OrganizationalUnit Staff | Export-Mailbox -PSTFolderPath f:\PSTs

 

There are multiple organizational units matching the identity "Staff". Please specify a unique value.

 

At line:1 char:1

 

+ G <<<< et-Mailbox -OrganizationalUnit Staff | Export-Mailbox -PSTFolderPath f

 

:\PSTs

 

[PS] F:\Documents and Settings\administrator>Get-Mailbox -OrganizationalUnit Sta

 

ff | Export-Mailbox -PSTFolderPath f:\PSTs

 

There are multiple organizational units matching the identity "Staff". Please s

 

pecify a unique value.

 

At line:1 char:1

 

+ G <<<< et-Mailbox -OrganizationalUnit Staff | Export-Mailbox -PSTFolderPath f

 

:\PSTs

 

I thought the issue may be to do with permissions and found an article which mentioned to check to see if the account I was using had exchange organisation admin rights and local admin rights (I was using the domain administrator account) which had these permissions but still had problems.

 

Whilst it was attempting to export the mailboxes I also received the following error:

 

Error was found for Staff name (staff email address) because: Error occurred in the step: Moving messages. Failed to copy messages to the destination mailbox store with error: MAPI or an unspecified service provider. ID no: 00000000-0000-00000000, error code: -1056749164 (Export-Mailbox) At line: 1

 

If anyone has run into these same issues and have found a cure please advise on what I could try that would really help.

 

Thanks

Posted

I've not done this with Exchange 2007 but getting the tiny PST with Exchange 2000/2003 always meant that the account I was using didn't have permissions.

 

Try exporting your own mailbox; if that works then you're definitely looking at permissions. If it doesn't then we'll have to wait for someone who knows what they're talking about :-)

Posted
I've not done this with Exchange 2007 but getting the tiny PST with Exchange 2000/2003 always meant that the account I was using didn't have permissions.

 

Try exporting your own mailbox; if that works then you're definitely looking at permissions. If it doesn't then we'll have to wait for someone who knows what they're talking about :-)

 

YesI have tjust tried that and your right it pulls out all info for my mailbox if I am logged in but doesnt do it for other mailboxes, its got to be a permissions issue.

 

I have ensured that the domain administrator account does have full exchange permissions.

Posted

Not sure that full exchange permissions is enough - it's a while since I did this (and it wasn't on 2007) but I seem to remember going into Exchange management, looking at the properties of the store and making sure that the account I was using to do PST backup had full control over the store and that this was inherited all the way down (this was with exmerge but I'd guess the idea's the same)

 

Exchange is intentionally very secure - by default admins can't access user email.

Posted

You're doing this on a 32bit box with the E2K7 admin tools? I believe you need send-as rights on the mailboxes and receive-as to import. You can set that on a DB like this with your own bits where I capitalised the words:

 

Get-MailboxDatabase -Identity “SERVER\STORAGEGROUP\MAILBOXDATABASE” | Add-ADPermission -User “DOMAIN\Administrator” -AccessRights ExtendedRight -ExtendedRights Send-As

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...