Вы имеете в виду:
until(!$jobquery -and !$testQuery)
Или, возможно, хорошим предложением было бы добавить обработку ошибок try catch, чтобы она выглядела примерно так:
Do{
try{
database Query that populates two variables. If both variables are empty then reboot the local host.
}catch{
if(!$jobquery){
Write-Host "Unable to do query because jobquery is empty. Error: $($_.Exception.Message)" -ForegroundColor Red
}elseif(!$testQuery){
Write-Host "Unable to do query because testquery is empty. Error: $($_.Exception.Message)" -ForegroundColor Red
}else{
Write-Host "Unable to do query because the following error: $($_.Exception.Message)" -ForegroundColor Red
}
}
}until(!$jobquery -and !$testQuery)
{
restart-computer -computername "localhost" -force
}
Надеюсь, это поможет!