Quantcast
Channel: Exchange Server 2013 - Administration, Monitoring, and Performance 论坛
Viewing all articles
Browse latest Browse all 8719

Export Mailboxes to PST using CSV

$
0
0

Hello - I'm in the process of exporting mailboxes from another exchange server from a company we acquired so I can import email into their new mailbox. I have a CSV formatted with headers old,new which has their old alias and new alias. I also only want to capture the last 60 days of email. However, I seem to be missing something in formatting as it keeps creating a new line instead of just executing the script. I'm at a loss and can't seem to get this working.

 

$sixty = get-date -format "M/d/yyyy" (get-date).AddDays(-60)
$UserList=Import-CSV C:\users.csv
FOREACH ($Person in $UserList) {
New-MailboxExportRequest -Mailbox $Person.old -ContentFilter {(MessageKind -eq 'Email') -and (Received -gt $sixty) -or (Sent -gt $sixty)} -FilePath "\\server\pst\"$Person.new".pst"
}

Any help would be appreciated!


Viewing all articles
Browse latest Browse all 8719

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>