Where am i going wrong ? powershell and pst files

by ollieda1 at 2013-03-04 23:32:48

hi all
I used the following powershell to try and extract a date ranged PST file for sent and received items between a specific date however when I open the extracted pst it only has the folder structure and no messages.
New-MailboxExportRequest -ContentFilter {(Received -lt ‘11/01/2008’) -and (Received -gt ‘9/30/2009’) -or (Sent -lt ‘11/01/2008’) -and (Sent -gt ‘9/30/2009’)} -Mailbox “john.smith” -Name JsmithExp -FilePath \EX01\PST$\JS.pst
Any ideas where i am going wrong ?
by ArtB0514 at 2013-03-05 06:20:46
You need to do some explicit grouping of your filter elements. Here’s how PowerShell will process what you entered (spaces added to make grouping more visible:
(received -lt ‘11/01/2008’) -and ((Received -gt ‘9/30/2009’) -or (Sent -lt ‘11/01/2008’)) -and (Sent -gt ‘9/30/2009’)
What you want to enter is:
((Received -lt ‘11/01/2008’) -and (Received -gt ‘9/30/2009’)) -or ((Sent -lt ‘11/01/2008’) -and (Sent -gt ‘9/30/2009’))