PowerShell - Import all .PST files in directory

18. October 2011 18:56

Thie script below will impor all the .PST in a directory.  NOTE: You MUST have the .PST name match the alias in the domain.

Get-ChildItem \\server\share\*.pst | foreach { $user = $_.BaseName; New-MailboxImportRequest -Mailbox $user -FilePath \\server\share\$user.pst -BadItemLimit 50 }

About Jim Bouse

I grew up with computers being a part of my life.  I set up my first 'network' by 15 (in 1997) and have been exploring innovative ways to make the lives easier for everyday people using tools readibly available.

 

I now work for Texas A&M University as a Senior Systems Administrator designing and maintaining a GIS system that is used by thousands of users daily.