============================================================================================
IT Dribble

Mutterings, inconsistant tips, rants and randomness

============================================================================================
Export mail within a date range on Exchange 2010 Powershell

$MailboxAlias = “YOUR-USER-NAME”
$BatchName=$MailboxAlias + “-export”
# SHARED-FOLDER-PATH requires Exchange Trusted Subsystem with NTFS modify permissions
$ExportShare = “\SERVER-NAMESHARED-FOLDER-PATH”

# There is also a date parsing bug with powershell, set servers regional settings to English (America)
# before opening your powershell window.

New-MailboxExportRequest -ContentFilter {(Received -le ‘01/12/2013′) -and (Received -ge ‘12/28/2012′)} -Name $BatchName -Mailbox $MailboxAlias -FilePath “$($ExportShare)$($MailboxAlias).PST”

============================================================================================