Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Measure-Command-Where1
Measure-Command {Get-Service | where Status -eq 'running'}
Days : 0
Hours : 0
Minutes : 0
Seconds : 0
Milliseconds : 34
Ticks : 349043
TotalDays : 4.03984953703704E-07
TotalHours : 9.69563888888889E-06
TotalMinutes : 0.000581738333333333
TotalSeconds : 0.0349043
TotalMilliseconds : 34.9043
PS C:\> Measure-Command {(Get-Service).Where({$_.Status -eq "Running"})}
Days : 0
Hours : 0
Minutes : 0
Seconds : 0
Milliseconds : 18
Ticks : 183664
TotalDays : 2.12574074074074E-07
TotalHours : 5.10177777777778E-06
TotalMinutes : 0.000306106666666667
TotalSeconds : 0.0183664
TotalMilliseconds : 18.3664
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment