For whatever reason the conditions were not met for it to run that particular code where it would iterate through all the available interfaces. It kept trying to run ipconfig on the first interface with the link and get stuck there.
Now, we have a number of machines with 12 interfaces and even if it did iterate through all the interfaces, going through 12 is quite slow as you can imagine, it takes 15 seconds to go through one interface. Rather then spending time on figuring out why the conditions weren't met to go through that code, I wrote another solution which would depend on bootif, which is much faster.
To answer your question, I frankly don't know