• 0

[Req] Batch Export PST's from Exchange 2010


Question

I have been exporting PST files for our company for terminated employees one by one and it takes a rather considerable amount of time to set each one up. Is there any method to just tell it to export from a list, or group?

 I am just trying to find a quicker way of exporting large groups of people.

 

I have been using the following command in powershell.

 

New-MailboxExportRequest -Mailbox username -FilePath "\\servername\Share\user.pst"

9 answers to this question

Recommended Posts

  • 0

Which version of Exchange are you using?

 

you can use a for-each cycle and a CSV file to check each mailbox and export it to a network share or volume; the CSV file must have a Alias column and the mailbox alias you want to export.

foreach ($i in (Import-Csv .\maiboxes.csv)) { New-MailboxExportRequest -Mailbox $i.Alias -FilePath "\\servername\share\$($i.Alias).pst" }

or you can export all the mailboxes in a single OU:

foreach ($i in (Get-Mailbox -OrganizationalUnit Marketing)) { New-MailboxExportRequest -Mailbox $i -FilePath "\\servername\share\$($i.Alias).pst" }

The above exports all the users mails to a network share PST with the user alias as the name of the PST; it will fetch the users mailbox in the Marketing OU.

 

Remember that this is resources consuming task; it will make the server crawl if done careless!

 

Edit: use this to check for the status of the queue.

Get-MailboxExportRequest | Remove-MailboxExportRequest
  • 0

i was hoping more for like a batch file or something. We wont be able to purchase something as they will just tell me to do it manually like i have been.

 

we just have a lot of turnover, so once a month or so i have to export a few hundred accounts.

  • 0

"so once a month or so i have to export a few hundred accounts."

every month is a few hundred, yeah that's a bit of turnover ;)

If you have your command, just run it in a loop with an array of your names.

here this should help

http://powertoe.wordpress.com/2009/12/14/powershell-part-4-arrays-and-for-loops/

  • 0

Well i just found this, but it keeps failing because its not naming the PST file at all, its just ".pst.pst"

 

$Export = Get-Content .\Mailbox.txt

 

$Export|%{$_|New-MailboxExportRequest -FilePath "\\servername\pst\$($_.alias).pst"} 

 

It will queue them up properly just it names the first file ".pst.pst" and then cannot create the remaining files because there is a duplicate name.

  • 0

Ok,

 

For anyone in the future with this issue this is what i did

 

$Export = Get-Content .\Mailbox.txt

 

Contents of mailbox.txt

 

Username1

Username2

Username3

$Export|%{$_|New-MailboxExportRequest -FilePath "\\servername\pst\$($_).pst"} 

 

This created an export request for each user account in the list.

 

I would prefer to do it using the whole ou as it would be easier to manage (wouldn't have to create a list) but this worked for me.

  • 0

Ok,

 

For anyone in the future with this issue this is what i did

 

$Export = Get-Content .\Mailbox.txt

$Export|%{$_|New-MailboxExportRequest -FilePath "\\servername\pst\$($_).pst"} 

 

This created an export request for each user account in the list.

 

I would prefer to do it using the whole ou as it would be easier to manage (wouldn't have to create a list) but this worked for me.

 

did you see my post? It's the same but in a more elegant way :D

also you can use the Get-Mailbox -OrganizationalUnit to export a whole OU.

  • 0

did you see my post? It's the same but in a more elegant way :D

also you can use the Get-Mailbox -OrganizationalUnit to export a whole OU.

Yes i saw it, not really a fan of using the foreach on the server though. But it did actually help me resolve my issue with how i was doing it. And i took the advice and created an OU of users to export rather than making a list. it helped out a lot.

This topic is now closed to further replies.
  • Posts

    • Wow, imagine you dump hundreds of hours into completing things and unlocking stuff and you lose it all. Back in the day when cheats were built into games, you could at least unlock things again that way without spending hundreds of hours again. But those days are long gone for some reason as no one builds cheats into games anymore. So it's even more painful that studio that's on its 6th installment **** it up so badly.
    • Spotify finally removes the disco ball app icon in the latest update by Ivan Jenic Image: Spotify Spotify has just released an update that removes its now infamous disco ball icon. The update reverts the app icon to the familiar flat green logo after weeks of mixed reactions online. The icon arrived on May 13 as part of the company's 20th anniversary celebration and was always intended to be temporary, though Spotify only confirmed that after the backlash started. The disco ball took the internet by storm, as the reception was split. A vocal group of users called it ugly and disorienting, with some iOS users noting that the 3D glowing effect made the app look like it was stuck mid-update. On the other end, the icon picked up a following of its own. Its retro, three-dimensional look immediately stood out against the flat, minimalist aesthetic that has dominated app design for years. It even started a small movement, spawning what people started calling "discomorphism," a mashup of disco and skeuomorphism. Other brands started posting disco ball versions of their own logos, probably in an effort to ride the wave of memes that flooded the internet during late May. Spotify has had a turbulent relationship with its user base lately. Besides the disco ball icon, which certainly wasn't appreciated by everyone, the company has also received backlash for its willingness to include AI-generated music on its platform. On May 17, Spotify promised the old icon would return “in a few weeks.” And now it looks like that time has finally arrived. So, whether you liked the disco ball or it made you uncomfortable, it’s now gone for good. The next time you update the Spotify app on your phone, the old, flat-design icon will return.
    • Playground Games confirms Forza Horizon 6 save wipe bug by Taras Buria Forza Horizon 6 was launched last month to critical acclaim (check out our review here), and it became a smash hit in an instant. Now, weeks into the launch, with die-hard fans clocking hundreds of hours, Forza Horizon 6 is facing a serious issue: save wipes. After multiple complaints on Reddit and social media, the studio issued a statement. The problem with missing saves came shortly after Playground Games promised the initial batch of gameplay tweaks and improvements. Unfortunately, there seems to be no temporary fixes for those affected by unexpected save wipes. However, the studio published a new support document with a few important steps users should try. First, affected gamers should open a support ticket immediately (go here to file one) so that the support team can try recovering the lost progress by reverting to an earlier save. Playground Games says this should be done the same day the issue occurs. Meanwhile, gamers are urged not to start new play sessions or create new saves. The studio also published a few things gamers should try to avoid to prevent potential progress loss: Ensure your Gaming Services app on PC or XBOX Series X|S console is fully up to date. On XBOX Series X|S consoles, disable Quick Resume for Forza Horizon 6: To disable Forza Horizon 6 from using Quick Resume, highlight the game box art anywhere in the console experience (Home, My Games & Apps, Pins, etc) and then press the Menu button, then go to Manage game and add-ons > Quick Resume settings > Disable Quick Resume. Ensure you are online when ‘quitting’ the game. Give your saved time to sync to the cloud before powering off or switching devices. Do not force quit the game during save screens. Do not power off the device during gameplay. Always "Quit" (console) or "Exit to desktop" (PC) once you've finished your play session, ensuring the save icon is not visible when you’re closing the game. Before turning off your console, shutting down your PC, or force-closing the Steam app, give your devices or clients at least a few minutes to ensure your latest progress has been synchronized with the cloud. This will reduce the risk of progress reversions as you switch between different platforms. XBOX Series X|S consoles, Steam, and the XBOX app on PC all include game save indicators that confirm your progress has been synced. You can read more about the bug in the official support document here. Forza Horizon 6 is currently available on PC (Steam and the Microsoft Store), Xbox Series X|S, and Game Pass. The game is also coming to PlayStation 5 later this year.
  • Recent Achievements

    • One Year In
      slackerzz earned a badge
      One Year In
    • One Year In
      highriskpaym earned a badge
      One Year In
    • One Month Later
      highriskpaym earned a badge
      One Month Later
    • Week One Done
      highriskpaym earned a badge
      Week One Done
    • Week One Done
      FBSPL earned a badge
      Week One Done
  • Popular Contributors

    1. 1
      +primortal
      520
    2. 2
      PsYcHoKiLLa
      197
    3. 3
      +Edouard
      157
    4. 4
      Steven P.
      84
    5. 5
      ATLien_0
      75
  • Tell a friend

    Love Neowin? Tell a friend!