Export-Mailbox (New Exmerge) In 2010

With Exmerge on my 2003 I used to be able to specify the DATES and period of extraction. How can I do something simlar with the export mailbox command? Is there another tool which is better?
Starquest321Asked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
AkhaterConnect With a Mentor Commented:
you didn't fill up the prerequisites yet, please follow my article it will lead you step by step

http://www.zerohoursleep.com/2010/11/export-and-import-mailboxes-in-exchange-2010-sp1/

0
 
rr1968Connect With a Mentor Commented:
Export-Mailbox -Identity <MailboxIdParameter> -StartDate "<Month/Day/Year>" -EndDate "<Month/Day/Year>" -PSTFolderPath <Path_Of_PST_Folder>\<File_Name>.pst

you can also look for entire attributes for Export command by entering the following powershell command

Get-Help Export-Mailbox -full
0
Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

 
Starquest321Author Commented:
How do I get to the GUI ?
0
 
rr1968Commented:
Exchange Management Console is the GUI for managing Exchange 2010, but I don't think that you will be able to specify a date range using GUI.
http://www.howexchangeworks.com/2009/06/export-import-in-exchange-2010.html
0
 
Starquest321Author Commented:
Somehow I stumbled on this link . . .and now I am confused:

http://technet.microsoft.com/en-us/library/ff607299.aspx

Do I need: New-MailboxExportRequest?
0
 
davorinCommented:
If you have Exchange 2010 then you need to use Export-Mailbox command.
If you use Exchange 2010 SP1, then you need to use New-MailboxExportRequest

That is one of the differences when you install SP1 on Exch 2010.
0
 
Starquest321Author Commented:
[PS] C:\Windows\system32>New-MailboxExportRequest -Identity Tom -StartDate "01/01/2008" -EndDate "12/31/2008" -PS
TFolderPath Z:\Tom\2008\cleanup2008.pst


The term 'New-MailboxExportRequest' is not recognized as the name of a cmdlet, function, script file, or operable progr
am. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:25
+ New-MailboxExportRequest <<<<  -Identity Tom -StartDate "01/01/2008" -EndDate "12/31/2008" -PSTFolderPath Z:\Tom\2008\cleanup2008.pst
    + CategoryInfo          : ObjectNotFound: (New-MailboxExportRequest:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

THis is the error I get
0
 
Starquest321Author Commented:
ok - I followed the procedure. . .now the is the command:

New-MailboxExportRequest -Mailbox jdoe -FilePath \\192.168.1.102\Outlook\jdoe\2008\2008cleanup.pst -StartDate "01/01/2008" -EndDate "12/31/2008"

Is there something wrong with the syntax above?


The term 'New-MailboxExportRequest' is not recognized as the name of a cmdlet, function, script file, or operable progr
am. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
0
 
AkhaterCommented:
The term 'New-MailboxExportRequest' is not recognized as the name of a cmdlet, function, script file, or operable program

means you didn't follow the instruction in my article, if you are sure you did then logoff, logon and try again
0
 
davorinCommented:
Can you please go to bin directory in your exchange server directory, find exsetup.exe file and check and post product version number of the file?
It should be something like 14.xx.xxxx.xxx
0
 
Starquest321Author Commented:
Akhater: I have followed the article and created the security group. When I run the command - maybe the problem is that I am not specifying the new security group "user" to run the command as? How can I check?
0
 
Starquest321Author Commented:
Akhater: I just realized something else - the articles does not specify if I should any members to the group. Could that be the problem?
0
 
AkhaterCommented:
Please add the user you are using to the group, logoff logon and try again
0
 
Starquest321Author Commented:
New-MailboxExportRequest -Mailbox jdoe -FilePath \\192.168.1.102\Outlook\jdoe\2008\2008cleanup.pst -StartDate "01/01/2008" -EndDate "12/31/2008"


Also - can you recheck my syntax?
0
 
Starquest321Author Commented:
Looks like the log off/on worked -- after adding the user to the group. But now a different problem:


A positional parameter cannot be found that accepts argument '-StartDate'.
    + CategoryInfo          : InvalidArgument: (:) [New-MailboxExportRequest], ParameterBindingException
    + FullyQualifiedErrorId : PositionalParameterNotFound,New-MailboxExportRequest
0
 
AkhaterCommented:
there is no start and end date parameters for New-MailboxExportRequest
0
 
Starquest321Author Commented:
O no! The whole point is to extract the mail box based on dates to the pst so you can later refer. . . .that is what exmerge did! And we have user mailboxes according to years/months.....

This is a real problem.. . wow
0
 
Starquest321Author Commented:
Found this:

Finally its worth mentioning that the New-MailboxExportRequest cmdlet supports the “-ContentFilter” parameter, which means that you have a rich set of extra filtering options as your disposal when exporting data. You can filter content based on attachments, recipients in TO/CC/BCC field, message body or subject, category, message expiration time, whether or not message has attachment, importance, whther message is flagged or read, message locale, participants, received date/time, policy tag, size and so on (check the Exchange 2010 SP1 help file for details).

For instance, if I only wanted to export messages with “Exchange” or “2010” in the body received before August 1st 2010, I would use this command:

New-MailboxExportRequest -Mailbox HEW -ContentFilter {(body -like "*Exchange*") -and (body -like "*2010*") -and (Received -lt "01/08/2010")} -FilePath \\EX02\PSTFiles\HEW.pst

But how can I specify the range?
0
 
AkhaterCommented:
I never said you can't filter based on dates but just that there is no startdate and enddate

New-MailboxExportRequest -Mailbox jdoe -FilePath \\192.168.1.102\Outlook\jdoe\2008\2008cleanup.pst -contentfilter {(Received -gt '2011-01-01') -and (Received -lt '2011-09-30')}
0
 
Starquest321Author Commented:
Great . . .but the question will it also extract the "Sent" items - not just recieved?
0
 
AkhaterCommented:
This will extract the whole mailbox not just the received, give it a try
0
 
Starquest321Author Commented:
Akhater: Before I do "damage" - I just want to confirm:

New-MailboxExportRequest -Mailbox jdoe -FilePath \\192.168.1.102\Outlook\jdoe\2008\2008cleanup.pst -contentfilter {(Received -gt '2008-01-01') -and (Received -lt '2008-12-31')}

The above will take ALL INBOX items - EMAIL ONLY - sent and recieved in 2008  from jdoe mailbox and put them as a pst file called 2008pstcleanup.pst

Right?
0
 
AkhaterCommented:
It will not cleanup though, original emails wont be deleted
0
 
Starquest321Author Commented:
So no good - how can I add the option to delete the original emails? Also contacts entered in 2008 will not be affected, right?
0
 
Starquest321Author Commented:
I would like to integrate the content filter to include selecting ONLY email messages. Would the line item at the bottom be the right way?

-ContentFilter {MessageKind -eq Email}

New-MailboxExportRequest -Mailbox jdoe -FilePath \\192.168.1.102\Outlook\jdoe\2008\2008cleanup.pst -contentfilter {(Received -gt '2008-01-01') -and (Received -lt '2008-12-31')} and
-ContentFilter {MessageKind -eq Email}


Now I am missing the "DELETE" the original so I can shrink mailbox sizes.
0
 
Starquest321Author Commented:
Looks like I have to integrate this?
http://social.technet.microsoft.com/Forums/en/exchange2010/thread/6536714e-8640-4b4b-a2d3-574e0d21ffb8

And I got here. .


http://technet.microsoft.com/en-us/library/ff459253.aspx

But .. .

But I don't know how to find the dates conent filter. .  .
0
 
AkhaterCommented:
there is no delete option in exchange 2010 you will need to do a totally different query using the search mailbox
0
 
Starquest321Author Commented:
What is the query for that?
0
 
Starquest321Author Commented:
I will open a new question for the delete query . . but to close this one:

Can you tell me how to integrate the Email option?


I would like to integrate the content filter to include selecting ONLY email messages. Would the line item at the bottom be the right way?

-ContentFilter {MessageKind -eq Email}

New-MailboxExportRequest -Mailbox jdoe -FilePath \\192.168.1.102\Outlook\jdoe\2008\2008cleanup.pst -contentfilter {(Received -gt '2008-01-01') -and (Received -lt '2008-12-31')} and
-ContentFilter {MessageKind -eq Email}
0
 
Starquest321Author Commented:
[PS] C:\Windows\system32>New-MailboxExportRequest -Mailbox jdoe -FilePath \\192.168.1.102\Outlook\jdoe\2008\2008cleanup.ps
t -contentfilter {(Received -gt '2008-01-01') -and (Received -lt '2008-12-31') -and(MessageKind -eq Email)}
The provided ContentFilter value is invalid. ContentFilter is invalid. Invalid filter syntax. For a description of the
filter parameter syntax see the command help.
"(Received -gt '2008-01-01') -and (Received -lt '2008-12-31') -and(MessageKind -eq Email)" at position 83. --> Invalid
filter syntax. For a description of the filter parameter syntax see the command help.
"(Received -gt '2008-01-01') -and (Received -lt '2008-12-31') -and(MessageKind -eq Email)" at position 83.
    + CategoryInfo          : InvalidArgument: ((Received -gt '...Kind -eq Email):String) [], ContentFilterInvalidPerm
   anentException
    + FullyQualifiedErrorId : 6841DBAC

Looks like my syntax is incorrect. Should I open up another question?
0
 
AkhaterCommented:
New-MailboxExportRequest -Mailbox jdoe -FilePath \\192.168.1.102\Outlook\jdoe\2008\2008cleanup.pst -contentfilter {(Received -gt '2008-01-01') -and (Received -lt '2008-12-31') -and (MessageKind -eq Email)}

please try this
0
 
Starquest321Author Commented:
I get this error:


[PS] C:\Windows\system32>New-MailboxExportRequest -Mailbox Ron -FilePath \\192.168.1.102\Outlook\ron\2008\2008cleanup.ps
t -contentfilter {(Received -gt '2008-01-01') -and (Received -lt '2008-12-31') -and (MessageKind -eq Email)}
The provided ContentFilter value is invalid. ContentFilter is invalid. Invalid filter syntax. For a description of the
filter parameter syntax see the command help.
"(Received -gt '2008-01-01') -and (Received -lt '2008-12-31') -and (MessageKind -eq Email)" at position 84. --> Invalid
 filter syntax. For a description of the filter parameter syntax see the command help.
"(Received -gt '2008-01-01') -and (Received -lt '2008-12-31') -and (MessageKind -eq Email)" at position 84.
    + CategoryInfo          : InvalidArgument: ((Received -gt '...Kind -eq Email):String) [], ContentFilterInvalidPerm
   anentException
    + FullyQualifiedErrorId : 61C308DF
0
 
AkhaterCommented:
New-MailboxExportRequest -Mailbox Ron -FilePath \\192.168.1.102\Outlook\ron\2008\2008cleanup.pst -contentfilter {(Received -gt '2008-01-01') -and (Received -lt '2008-12-31') -and (MessageKind -eq "Email")}

please
0
 
Starquest321Author Commented:
PERFECT . . IT WORKED.
Now how can I run the another command to cleanup the extracted emails from the mailbox?
http://www.experts-exchange.com/Software/Server_Software/Email_Servers/Exchange/Q_27344232.html
0
 
AkhaterCommented:
i will see if i can help with the other question, if you got your answer on this one please close it
0
 
Starquest321Author Commented:
Thanks Akhatar
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.