title: Multiple variables in Foreach loop [PowerShell]
body: <p>Is it possible to pull two variables into a Foreach loop?</p>
  
  <p>The following is coded for the PowerShell ASP. The syntax is incorrect on my Foreach loop, but you should be able to decipher the logic I'm attempting to make.</p>
  
  <pre><code>$list = Get-QADUser $userid -includeAllProperties | Select-Object -expandproperty name
  $userList = Get-QADUser $userid -includeAllProperties | Select-Object -expandproperty LogonName
  if ($list.Count -ge 2)
  {
      Write-host "Please select the appropriate user.&lt;br&gt;"
      Foreach ($a in $list &amp; $b in $userList)
      {
          Write-host "&lt;a href=default.ps1x?UserID=$b&amp;domain=$domain&gt;$b - $a&lt;/a&gt;&lt;br&gt;"}
      }
  }
  </code></pre>