相关疑难解决方法(0)

在PowerShell中定时执行命令

有没有一种简单的方法来计算PowerShell中命令的执行时间,比如Linux中的'time'命令?
我想出了这个:

$s=Get-Date; .\do_something.ps1 ; $e=Get-Date; ($e - $s).TotalSeconds
Run Code Online (Sandbox Code Playgroud)

但我想要更简单的东西

time .\do_something.ps1
Run Code Online (Sandbox Code Playgroud)

powershell time

198
推荐指数
7
解决办法
12万
查看次数

标签 统计

powershell ×1

time ×1