How it works...

This time, it was made evident in the interactive output how it works. The first run happened without checking for the condition. At the end of the run, the condition was checked for. 9 is greater than 0, and not equal. The outcome was $false, so the loop continued. It went on this way until the count came down to 0 (making the outcome of the condition $true), at which point, the loop exited. Essentially, the loop statement was, 'Go on until the count becomes zero.'

That concludes our chapter on flow control. I hope that you had a nice time learning the techniques, and that this chapter helps you with a good chunk of automation work you wish to carry out after learning to use PowerShell.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.143.168.172