Last active
January 10, 2022 12:06
-
-
Save maestropanel2/8fb733c62719c0c08c1108f4dd4582d8 to your computer and use it in GitHub Desktop.
Optimal New-MailboxImportRequest for MaestroPanel Exchange
This file contains 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: ping@maestropanel.com | |
. '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