I am doing some bulk PST imports using New-MailboxImportRequest. Just FYI, this is the command I used:
Dir "\\PATHNAME\*.pst" | %{ New-MailboxImportRequest -Name RecoveredPST -BatchName JPDETW -Mailbox $_.BaseName -FilePath $_.FullName -BadItemLimit 5000 -AcceptLargeDataLoss}
I can get the status shown in percentage complete by running: Get-MailboxImportRequest -name recoveredPST | Get-MailboxImportRequestStatisticswhich outputs the coulumsn Name, Status, TargetAlias, PercentComplete, but have to run it manually ad hoc
I would love to make this status into automated message and status bar using Write-Progress. I could add up the contents of the PercentComplete column returned ($SUMlPercentComplete), then divide by the number of items in that column, to get a total percentage complete ($TotalPercentComplete) for all mailboxes, then pipe that into write-progress. The only problem is that I read Write-Progress doesnt accept inputs from pipes.
If Ran a timed command that ran every 5 seconds until TotalPercentComplete= 100 then maybe that would work?
Anyone have any really fun ideas on this? :-)
-- Ron Williams http://www.r0nwilliams.com