$url=’http://www.powershell.com’
# track execution time:
$timeTaken=Measure-Command -Expression {
$site=Invoke-WebRequest -Uri $url
}
$milliseconds=$timeTaken.TotalMilliseconds
$milliseconds=[Math]::Round($milliseconds, 1)
“This took $milliseconds ms to execute”
© 版权声明
文章版权归作者所有,未经允许请勿转载。