Powershell
如何按“StatusDetail”過濾 Exchange 2013 new-moverequest
我正在嘗試報告“有趣的”移動、錯誤、滯後或緩慢。
我從這個開始
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
但是對輸出沒有影響。我已經嘗試過括號但無濟於事
試試這個:
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