-
-
Save hermesthecat/df0d090b77f8a8af25eadd4dde5a3121 to your computer and use it in GitHub Desktop.
Optimal New-MailboxImportRequest for MaestroPanel Exchange
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #Exchange Server 2013/2016 Import Script | |
| #Desc: This script importes all mailbox backup files in directory to Exchange Server | |
| #Url: https://wiki.maestropanel.com/exchange-servera-toplu-sekilde-pst-dosyasi-import-etmek/ | |
| #Author: MaestroPanel Support | |
| #Email: [email protected] | |
| . 'C:\Program Files\Microsoft\Exchange Server\V15\bin\RemoteExchange.ps1' | |
| Connect-ExchangeServer -Auto | |
| #Change this line for your directory path | |
| $Source = "\\localhost\c$\backupmail" | |
| Get-ChildItem *.pst -Path $Source | Select Name,BaseName | ForEach { | |
| New-MailboxImportRequest -MailBox $_.BaseName -FilePath "$Source\$($_.Name)" -InternalFlags "SkipPreFinalSyncDataProcessing","SkipWordBreak","SkipStorageProviderForSource","SkipMailboxReleaseCheck","SkipProvisioningCheck","DoNotConvertSourceToMeu" -AcceptLargeDataLoss -LargeItemLimit unlimited -BadItemLimit unlimited -Confirm:$false | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment