Exchange 2010 – Watch PST Import Request Progress
Quick Powershell script to watch the status of import requests in Exchange 2010.
<#
.SYNOPSIS
Detailed stats on a single PST import request
.DESCRIPTION
Watch the status of a single PST import request
.NOTES
Author: Jonathan
.LINK
http://elderec.org
.PARAMETER Identity
Identity of Mailbox Import Request
.EXAMPLE
.\Watch-ImportRequest.ps1 -Identity "Jon Q. User"
#>
param (
[parameter(Mandatory=$true, HelpMessage="Enter the Identity of the active move request.")][string]$Identity
)
do {
$mbMove = Get-MailboxImportRequestStatistics -Identity $Identity
$stat = "Importing PST | $Identity"
$act = "Duration: " + [string]$mbMove.OverallDuration + " | " + $mbMove.PercentComplete + "% complete"
Write-Progress -activity $act -Status $stat -percentComplete $mbMove.PercentComplete
}
Until ( $mbMove.Status -eq "Completed" )