For Each Thing: `foreach`

The foreach statement runs the steps in its braces once for each item in a list, with a variable you name holding this item, so a script renames 30 files or 200 with one loop and can decide about each one with an if.

Updated

Cheat sheet for the lesson For Each Thing: `foreach`: The foreach statement runs the steps in its braces once for each item in a list, with a variable you name holding this item, so a script renames 30 files or 200 with one loop and can decide about each one with an if.
Category
PowerShell
Level
Apprentice
Tags
foreach Loop, foreach-object, loop, powershell, rename-item