Wait-VM 模块中 "Reboot" 类型的功能是什么
What is the functionality of "Reboot" type in the Wait-VM module
“等待 VM -Name $VMName -For 重启”
没有适用于此模块的适当文档。
Wait-VM -For Reboot
检查目标 VM 的当前正常运行时间,并等待直到正常运行时间指标低于之前的水平。
PowerShell 中的等价物是:
$uptime = (Get-VM -Name $VMName).Uptime
do{
# Wait
Start-Sleep -Second 1
# Fetch latest uptime metric
$newestUptime = (Get-VM -Name $VMName).Uptime
# Keep waiting until uptime dips below previous value
$stillWaiting = $newestUptime -ge $uptime
# Track new uptime value
$uptime = $newestUptime
}while($stillWaiting)
There is no proper documentation available for this module.
模块本身是 documented here, but Wait-VM
is conspicuously missing, and has been for almost 3 years - 我建议提供有关 GitHub
的反馈
“等待 VM -Name $VMName -For 重启”
没有适用于此模块的适当文档。
Wait-VM -For Reboot
检查目标 VM 的当前正常运行时间,并等待直到正常运行时间指标低于之前的水平。
PowerShell 中的等价物是:
$uptime = (Get-VM -Name $VMName).Uptime
do{
# Wait
Start-Sleep -Second 1
# Fetch latest uptime metric
$newestUptime = (Get-VM -Name $VMName).Uptime
# Keep waiting until uptime dips below previous value
$stillWaiting = $newestUptime -ge $uptime
# Track new uptime value
$uptime = $newestUptime
}while($stillWaiting)
There is no proper documentation available for this module.
模块本身是 documented here, but Wait-VM
is conspicuously missing, and has been for almost 3 years - 我建议提供有关 GitHub