Export-Mailbox for a list of users in a specified OU
Hi,I am going to implement outlook autoarchive policy for a list of users in a specific OU or CSV.I want to export their mailboxes through Export-mailbox cmdlet to PST for a safer side before applying this policy.I also have a requirement to export the last year mails of some users to PST(another query) and then remove those mails from mailbox, kindly help if this could also be done by taking the input from a OU or a csv file.RegardsSupreet Singh
March 7th, 2010 11:16pm

for your first requestget-mailbox -OrganizationalUnit "ou=ou1,dc=domain,dc=com" | export-mailbox -pstfolderpath c:\pst for your second request get-mailbox -OrganizationalUnit "ou=ou2,dc=domain,dc=com" | export-mailbox -pstfolderpath c:\pst -EndDate "12-31-2009" -DeleteContent:$true Full time IT consultant since 1998 mainly on Exchange\ISA\AD MCSE NT4.0,2000/2003, CCNA MCITP: Enterprise Messaging Administrator 2007/2010 MCT since 2001
Free Windows Admin Tool Kit Click here and download it now
March 8th, 2010 1:24am

Hi lAdK,Many thanks for your answer, it seems that this script will work for me, i will check & revert on the same.Please tell me if i can export the mailboxes to pst files of users mentioned in csv file.RegardsSupreet Singh
March 8th, 2010 6:14am

Should be something close to import-csv c:\users.csv | foreach {export-mailbox $_.UserName -PSTFolderPath "c:\PST" -Confirm:$false} if it doesn't work, share the content of your CSVFull time IT consultant since 1998 mainly on Exchange\ISA\AD MCSE NT4.0,2000/2003, CCNA MCITP: Enterprise Messaging Administrator 2007/2010 MCT since 2001
Free Windows Admin Tool Kit Click here and download it now
March 8th, 2010 9:16am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics