我正在尝试报告“有趣”的动作、错误的、滞后的或缓慢的动作。
我从这个开始
Get-MoveRequest -ResultSize unlimited
| where {$_.status -ne "Completed"
-and ( ( $_.StatusDetail -ne "CopyingMessages")
-and ( $_.StatusDetail -ne "Queued") ) }
| Get-MoveRequestStatistics |sort percentcomplete
| ft displayname, percentcomplete, status, statusdetail, syncstage, baditemsencountered, totalinprogressduration, totalmailboxsize, message, validationmessage, *duration -a
但是对输出没有影响。我尝试过使用括号,但无济于事
答案1
尝试这个:
Get-MoveRequest -ResultSize unlimited |
Where {$_.status -ne "Completed" -and $_.StatusDetail -ne "CopyingMessages" -and $_.StatusDetail -ne "Queued" } |
Get-MoveRequestStatistics |
Format-Table Displayname, Percentcomplete, Status, Statusdetail, Syncstage, Baditemsencountered, Totalmailboxsize, Message, Validationmessage, *duration -AutoSize