The below Power Shell command will produce numbers ranging from 1 to 12 with the help of the ‘for loop’!
for ($i = 1; $i -lt 13; $i++) { $i }
The above program has generated the following outcome:-
1 2 3 4 5 6 7 8 9 10 11 12
The ‘for loop’ in Power Shell command is almost the same as the ‘for loop’ in other programming languages such as c++, Java, and Python.