另一个方法是设置两个时间快照和结束时间,计算它们的时差。这将告诉你Get-Hotfix执行了多久,得到的输出数据里将包含脚本执行的时间:
$start = Get-Date
Get-HotFix
$end = Get-Date
Write-Host -ForegroundColor Red ('Total Runtime: ' + ($end - $start).TotalSeconds)
文章出处:http://www.pstips.net/
另一个方法是设置两个时间快照和结束时间,计算它们的时差。这将告诉你Get-Hotfix执行了多久,得到的输出数据里将包含脚本执行的时间:
$start = Get-Date
Get-HotFix
$end = Get-Date
Write-Host -ForegroundColor Red ('Total Runtime: ' + ($end - $start).TotalSeconds)
文章出处:http://www.pstips.net/

2023-02-27
0万阅读

2023-02-27
0万阅读

2023-02-26
0万阅读

2023-02-22
4万阅读

2023-02-12
9万阅读

2023-01-18
4万阅读

2023-01-18
4万阅读

2023-01-17
5万阅读

2023-01-08
5万阅读

2023-01-07
2万阅读

2023-02-27
0万阅读

2023-02-27
0万阅读

2023-02-26
0万阅读

2023-02-22
4万阅读

2023-02-12
9万阅读

2023-01-18
4万阅读

2023-01-18
4万阅读

2023-01-17
5万阅读

2023-01-08
5万阅读

2023-01-07
2万阅读