# Stopping Early: \`break\` and \`continue\`

A loop keeps a count or a running total in a variable started before it, continue skips the rest of one pass and goes on with the next item, break leaves the loop at once, and inside ForEach-Object return skips an item instead.

![Cheat sheet for the lesson Stopping Early: \`break\` and \`continue\`: A loop keeps a count or a running total in a variable started before it, continue skips the rest of one pass and goes on with the next item, break leaves the loop at once, and inside ForEach-Object return skips an item instead.](https://fsdtrainingmedia.blob.core.windows.net/public/images/2026/11/bf51de6307be48af80d442869f000d4f.webp)

- Category: PowerShell
- Level: Apprentice
- Tags: break, continue, import-csv, loop-counter, powershell
- Updated: November 10, 2026

Source: https://www.ask-codey.com/cheat-sheets/powershell-loop-control-cheat-sheet
