How to Export all Email from Exchange Server 2010 for a Specified Time Period
Hi. I need to export all email for all users from our 2010 Exchange Server (about 200) for a two month period (11/21/2016 to 02/01/2017) to be ingested by Intermedia for onpremise archiving. I'm not a power shell guru and I need help. I've looked at several scripts, but was left more confused than not.
Thank you very much for your reply. I ran the script and this is what I got:
Windows PowerShell
Copyright (C) 2009 Microsoft Corporation. All rights reserved.
PS N:\> $Export=.\mailboxes.txt
The term '.\mailboxes.txt' is not recognized as the name of a cmdlet, function, scri
the spelling of the name, or if a path was included, verify that the path is correc
At line:1 char:24
+ $Export=.\mailboxes.txt <<<<
+ CategoryInfo : ObjectNotFound: (.\mailboxes.txt:String) [], CommandNo
+ FullyQualifiedErrorId : CommandNotFoundException
Nice find.
I strongly recommend upgrading powershell to 3 or 4.
Awaiting outcome
skbryan
ASKER
It appears to be backing up the email boxes s l o w l y, probably because I am in a hurry. Don't want to open one yet because I don't want to mess anything up.
If I upgrade Powershell, will it still be compatible with my version of Exchange? (I understand that some of the commands may be different). I am a total PS newbie . . . pretty sure that you already knew that.
Thank you very much for all your help, and I will let you know how this comes out.
Patrick Bogers
Ahh off course...Exchange 2010 cmdlets and scripts require PS 2.0 *sigh*
I understand it is slowly, this was intended so we do not interupt user experience.
This script Will do one pst at a time so it is ok to copy/open one that has finished.
Hear from you later. Glad we Got it working as desired.
Wah! It appears to be stalled. It stopped working about the same time that I disconnected from the server, about 3:34pm. (Obviously, I removed our company and username from the attached screenshots).
Screenshot of folder where the export is being dumped (not showing usernames).
Is there a way to "goose" the command? Thank you.
Patrick Bogers
Hi
Too bad but logical since the process in running under your security context.
What do you mean by Goose the command? Have it run while you are offline?
Guess we can let it run as scheduled task which runs one time on demand under the local system security context.
No username shown can be caused by the leading dollarsign in $($i).pst
If you do a dir in elevated dir, does it show usernames?
skbryan
ASKER
I'm logged into the server and my command is still up (I never logged out, just disconnected), but it isn't going anywhere. How would I get it to run whether or not I am connected to the server or not? I am a domain admin with Mailbox Import Export rights.
By "goose", I meant a command like, "Hey, you still need to run the above command. Please resume where you left off.". If I reenter and start over, won't it still stall if I am not connected?
The usernames and all that other stuff is there, I just removed it for privacy's sake.
Ok Nice.
What does below commands say?
Get-MailboxExportRequest | where {$_.status -eq "Completed"} | Remove-MailboxExportRequest
Get-MailboxExportRequest | where {$_.status -eq "Failed"} | Remove-MailboxExportRequest
Next i wonder what rollup and cu you are running. I know the stuck issue is pre-ru6
No, nothing is queued. Everything showed as completed (but the exported mailboxes did not really export, most of them show 265 kb) or as Failed. Most of the items showed as Completed.
Patrick Bogers
Hmm ok. For the bigger experts, can you verify the export is between thr dates specified?
skbryan
ASKER
Ran the command to do the export again. Yup, dates are good. Will see how this one goes. Thank you.
Windows PowerShell
Copyright (C) 2009 Microsoft Corporation. All rights reserved.
PS N:\> $Export=.\mailboxes.txt
The term '.\mailboxes.txt' is not recognized as the name of a cmdlet, function, scri
the spelling of the name, or if a path was included, verify that the path is correc
At line:1 char:24
+ $Export=.\mailboxes.txt <<<<
+ CategoryInfo : ObjectNotFound: (.\mailboxes.txt:String) [], CommandNo
+ FullyQualifiedErrorId : CommandNotFoundException
PS N:\> foreach ($i in ($Export)) {New-MailboxExportRequest -ContentFilter {(Recei
-gt '02/01/2017')} -Mailbox $i -Filepath "\\10.10.1.35\EmailBackup\
Also, will this pick up all sent messages as well, correct? Thank you very much for your help!!!!!