No need to guess, the evidence is already there.
Learn how to use PowerShell "for" loop to automate tasks in Windows PowerShell. Includes syntax, examples, loop comparisons ...