From b8a724a65220a8697aa1d55a7cc3960e02ae0213 Mon Sep 17 00:00:00 2001 From: Christian Pohle Date: Fri, 19 Jun 2020 09:47:44 +0200 Subject: [PATCH] Update Exchange Move Requests.ps1 Add Snapin, when Statements are called from the normal PowerShell or the ISE and not from the Exchange Management Shell --- Microsoft/Exchange/Exchange Move Requests.ps1 | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Microsoft/Exchange/Exchange Move Requests.ps1 b/Microsoft/Exchange/Exchange Move Requests.ps1 index 720d3b8..76f3195 100644 --- a/Microsoft/Exchange/Exchange Move Requests.ps1 +++ b/Microsoft/Exchange/Exchange Move Requests.ps1 @@ -1,5 +1,12 @@ # Handle Exchange Move Requests +# Load Snap In (when called in PowerShell ISE and not in Exchange Management Shell) +# Snapin for Exchange 2013 and later + Add-PSSnapin Microsoft.Exchange.Management.PowerShell.SnapIn; + +# Show current Database + Get-mailbox -identity LOGONID | fl database, alias + # New Batch New-MoveRequest -Identity ALIAS -TargetDatabase DATABASE -BatchName ALIAS -BadItemLimit 10000