Just wrote a basic script for importing PST files into mailboxes, that I want to share with the community.
It is designed to check for PST files in the specified folder. Based on the filenames (of the PST files) it then verifies that a mailbox can be found. This is done by using the filename and adding the @ character and the domain value into a string value. If there is a match, it returns a value of $True and the script continues with running the New-MailboxImportRequest cmdlet.
The script is written just as basic as it can, it provides much information about values and what’s going on. The most recent updated script can be downloaded here
I hope this will help you to import the PST files into the mailboxes
Ps. Sorry for the word-wrap, see the script file instead of copy the script code below
Changelog v1.1 – Updated the $name variable due to issues with filenames got trimmed away. Also added so that if errors exists, they will be sent to a errorlog. Thanks to Chris Steding!
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.
Just wrote a basic script for importing PST files into mailboxes, that I want to share with the community.
It is designed to check for PST files in the specified folder. Based on the filenames (of the PST files) it then verifies that a mailbox can be found. This is done by using the filename and adding the @ character and the domain value into a string value. If there is a match, it returns a value of $True and the script continues with running the New-MailboxImportRequest cmdlet.
The script is written just as basic as it can, it provides much information about values and what’s going on.
The most recent updated script can be downloaded here
I hope this will help you to import the PST files into the mailboxes
Ps. Sorry for the word-wrap, see the script file instead of copy the script code below
Changelog
v1.1 – Updated the $name variable due to issues with filenames got trimmed away. Also added so that if errors exists, they will be sent to a errorlog. Thanks to Chris Steding!
Share this post
Link to post
Share on other sites