PoshCode Archive  Artifact [ce870c3759]

Artifact ce870c3759bc6ad921c08cba5e25b6193563c9a2b66bf35ddc439150404eff39:

  • File Mailbox-Move-monitor.ps1 — part of check-in [6d51f9849f] at 2018-06-10 13:56:46 on branch trunk — Run the following from the Exchange 2010 shell and it will give you a semi-graphical view on the status of any open move requests: (user: themoblin size: 1014)

# encoding: ascii
# api: powershell
# title: Mailbox Move monitor
# description: Run the following from the Exchange 2010 shell and it will give you a semi-graphical view on the status of any open move requests:
# version: 0.1
# author: themoblin
# license: CC0
# x-poshcode-id: 5535
# x-archived: 2014-12-27T21:39:24
# x-published: 2014-10-24T10:52:00
#
#
while ($TRUE) {
	$Requests = get-moverequest|get-moverequeststatistics
	$Requests | Foreach-Object {
		if ($_.status -eq "InProgress") {
			Write-Host -foregroundcolor "Yellow" "Mailbox move for $($_.Displayname) is in progress and is $($_.PercentComplete)% complete"
		}
		elseif ($_.status -eq "Completed"){
			Write-Host -ForegroundColor "Green" "Mailbox move for $($_.Displayname) is complete. $($_.BaditemsEncountered) bad items were encountered"
		}
		elseif ($_.status -eq "Queued"){
			Write-Host -ForegroundColor "RED" "Mailbox move for $($_.Displayname) is still queued"
		}

	}
	Start-sleep -seconds 10
	Clear-Host
}