How to count objects in PowerShell?

后端 未结 5 2178
星月不相逢
星月不相逢 2020-12-07 14:17

As I\'m reading in the PowerShell user guide, one of the core PowerShell concepts is that commands accept and return objects instead of text. So for example, runnin

5条回答
  •  南笙
    南笙 (楼主)
    2020-12-07 14:51

    in my exchange the cmd-let you presented did not work, the answer was null, so I had to make a little correction and worked fine for me:

    @(get-transportservice | get-messagetrackinglog -Resultsize unlimited -Start "MM/DD/AAAA HH:MM" -End "MM/DD/AAAA HH:MM" -recipients "user@domain.com" | where {$_.Event
    ID -eq "DELIVER"}).count
    

提交回复
热议问题