Skip to content

Glossary: Command Line for IT: Bash and PowerShell

foreach

Also written: foreach loop

PowerShell's loop, written foreach ($d in $drives) { }, that runs the block once for each item in a list.

Where the book teaches it

Related terms

forForEach-Object