title: Why does 'continue' behave like 'break' in a Foreach-Object?
body: <p>If I do the following in a PowerShell script:</p>
  
  <pre><code>$range = 1..100
  ForEach ($_ in $range) {
      if ($_ % 7 -ne 0 ) { continue; }
      Write-Host "$($_) is a multiple of 7"
  }
  </code></pre>
  
  <p>I get the expected output of:</p>
  
  <pre><code>7 is a multiple of 7
  14 is a multiple of 7
  21 is a multiple of 7
  28 is a multiple of 7
  35 is a multiple of 7
  42 is a multiple of 7
  49 is a multiple of 7
  56 is a multiple of 7
  63 is a multiple of 7
  70 is a multiple of 7
  77 is a multiple of 7
  84 is a multiple of 7
  91 is a multiple of 7
  98 is a multiple of 7
  </code></pre>
  
  <p>However, if I use a pipeline and <code>ForEach-Object</code>, <code>continue</code> seems to break out of the pipeline loop.</p>
  
  <pre><code>1..100 | ForEach-Object {
      if ($_ % 7 -ne 0 ) { continue; }
      Write-Host "$($_) is a multiple of 7"
  }
  </code></pre>
  
  <p>Can I get a <code>continue</code>-like behavior while still doing ForEach-Object, so I don't have to breakup my pipeline?</p>