title: Nested ForEach() in PowerShell
body: <p>I'm having some troubles with nested ForEach loops in Powershell. First, I need to iterate through list 1. For every object in list 1, I need to iterate through list 2. When I found the resembling object in list 2, I want to go to the next object in list 1. </p>
  
  <p>I've tried break, i've tried continue, but it won't work for me.</p>
  
  <pre><code>Function checkLists() {
    ForEach ($objectA in $listA) {
      ForEach ($objectB in $listB) {
         if ($objectA -eq $objectB) {
             // Do something 
             // goto next object in list A and find the next equal object
         }
      }
    }
  }
  </code></pre>
  
  <p>a) What does a break/continue exactly do in PowerShell?</p>
  
  <p>b) How exaclty should I conquer my 'problem'?</p>