Soldato
Being a being a bit of a cack-handed thicko here with a do loop with two conditions.
My expectation is that the loop will break if either condition becomes false. However, the second condition is seemingly never met and the codeblock simply repeats for 60 seconds and meets the first condition.
ta, Paul.
Code:
$Timer = get-Date
do
{
$Codeexecutedsuccessfully = 0
<CODEBLOCK>
$Codeexecutedsuccessfully = 1
}
while (((Get-Date).AddMinutes(-1) -le $Timer) -or ($Codeexecutedsuccessfully -eq 0))
ta, Paul.