Cmdlet

Measure-Command cmdlet用于测量脚本或命令所用的时间。

示例

在这个例子中,我们将展示如何测量geteventlog命令在PowerShell事件日志中记录事件的时间。

Measure-Command { Get-EventLog "Windows PowerShell" }

输出

Days              : 0
Hours             : 0
Minutes           : 0
Seconds           : 0
Milliseconds      : 50
Ticks             : 506776
TotalDays         : 5.86546296296296E-07
TotalHours        : 1.40771111111111E-05
TotalMinutes      : 0.000844626666666667
TotalSeconds      : 0.0506776
TotalMilliseconds : 50.6776
Powershell-Measure-CommandCmdlet
日期:2019-08-20 13:51:09 来源:oir作者:oir