do until powershell
do {} until ($false) is an infinite loop; it'll only exit if you use something like break, return or throw from inside the loop body. do { } until ($true) would execute the loop body exactly once (which would make the loop rather pointless.) It looks like what you intended to do was wait for a file to exist.