Solved

Export-Mailbox (New Exmerge) In 2010

Posted on 2011-09-17
37
1,535 Views
Last Modified: 2012-08-13
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?
0
Comment
Question by:Starquest321
  • 21
  • 11
  • 3
  • +1
37 Comments
 
LVL 27

Assisted Solution

by:davorin
davorin earned 100 total points
ID: 36554102
0
 
LVL 8

Assisted Solution

by:rr1968
rr1968 earned 100 total points
ID: 36554342
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
 

Author Comment

by:Starquest321
ID: 36554446
How do I get to the GUI ?
0
 
LVL 8

Expert Comment

by:rr1968
ID: 36554503
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
 

Author Comment

by:Starquest321
ID: 36555526
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
 
LVL 27

Expert Comment

by:davorin
ID: 36555970
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
 

Author Comment

by:Starquest321
ID: 36565239
[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
 
LVL 49

Accepted Solution

by:
Akhater earned 300 total points
ID: 36565251
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
 

Author Comment

by:Starquest321
ID: 36565323
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
 
LVL 49

Expert Comment

by:Akhater
ID: 36565330
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
 
LVL 27

Expert Comment

by:davorin
ID: 36568109
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
 

Author Comment

by:Starquest321
ID: 36594485
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
 

Author Comment

by:Starquest321
ID: 36595238
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
 
LVL 49

Expert Comment

by:Akhater
ID: 36595607
Please add the user you are using to the group, logoff logon and try again
0
 

Author Comment

by:Starquest321
ID: 36595800
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
 

Author Comment

by:Starquest321
ID: 36595817
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
 
LVL 49

Expert Comment

by:Akhater
ID: 36595856
there is no start and end date parameters for New-MailboxExportRequest
0
 

Author Comment

by:Starquest321
ID: 36595876
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
The problems with reply email signatures

Do you wish that you could place an email signature under a reply? Well, unfortunately, you can't. That great Exchange/Office 365 signature you've created will just appear at the bottom of an email chain. What a pain! Is there really no way to solve this? Well, there might be...

 

Author Comment

by:Starquest321
ID: 36595888
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
 
LVL 49

Expert Comment

by:Akhater
ID: 36595893
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
 

Author Comment

by:Starquest321
ID: 36595901
Great . . .but the question will it also extract the "Sent" items - not just recieved?
0
 
LVL 49

Expert Comment

by:Akhater
ID: 36595921
This will extract the whole mailbox not just the received, give it a try
0
 

Author Comment

by:Starquest321
ID: 36595933
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
 
LVL 49

Expert Comment

by:Akhater
ID: 36596010
It will not cleanup though, original emails wont be deleted
0
 

Author Comment

by:Starquest321
ID: 36597000
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
 

Author Comment

by:Starquest321
ID: 36597326
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
 

Author Comment

by:Starquest321
ID: 36597341
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
 
LVL 49

Expert Comment

by:Akhater
ID: 36708204
there is no delete option in exchange 2010 you will need to do a totally different query using the search mailbox
0
 

Author Comment

by:Starquest321
ID: 36708603
What is the query for that?
0
 

Author Comment

by:Starquest321
ID: 36711688
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
 

Author Comment

by:Starquest321
ID: 36711907
[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
 
LVL 49

Expert Comment

by:Akhater
ID: 36714742
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
 

Author Comment

by:Starquest321
ID: 36714765
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
 
LVL 49

Expert Comment

by:Akhater
ID: 36714813
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
 

Author Comment

by:Starquest321
ID: 36714926
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
 
LVL 49

Expert Comment

by:Akhater
ID: 36714941
i will see if i can help with the other question, if you got your answer on this one please close it
0
 

Author Comment

by:Starquest321
ID: 36714958
Thanks Akhatar
0

Featured Post

Do email signature updates give you a headache?

Do you feel like you are constantly making changes to email signatures? Are the images not formatting how you want them to? Want high-quality HTML signatures on all devices, including on mobiles and Macs? Then, let Exclaimer solve all your email signature problems today.

Join & Write a Comment

Find out how to use Active Directory data for email signature management in Microsoft Exchange and Office 365.
ADCs have gained traction within the last decade, largely due to increased demand for legacy load balancing appliances to handle more advanced application delivery requirements and improve application performance.
In this video we show how to create a mailbox database in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Servers >> Data…
This video discusses moving either the default database or any database to a new volume.

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now