title: Seach for all Active Directory Users starting with "CA" with variable
body: <p>I'm currently programing an administration tool and I could need some help.</p>
  <p>I want that every user, starting with &quot;ca&quot; gets imported to the listbox.
  The Import into the listbox works perfectly fine.</p>
  <p>The users I own e.g. are &quot;cambridge&quot;, &quot;california&quot; and &quot;call&quot;.</p>
  <pre><code>$searchuser = &quot;ca&quot;
  
  if(@(Get-ADObject -Filter { sAMAccountname -eq $searchuser }).Count -ge 1){
                  Get-ADObject -Filter { sAMAccountname -eq $($searchuser) } | foreach{[void]$lstUsers.Items.Add($_.name)}
                  
              } else {
  
                  [System.Windows.Forms.MessageBox]::Show(&quot;No user found.&quot;,&quot;Error&quot;,[System.Windows.Forms.MessageBoxButtons]::OK,[System.Windows.Forms.MessageBoxIcon]::Warning)
  
              }
  </code></pre>
  <p>If I put a single username into the variable it works without any problems but with multiple it doesn't want to work...</p>
  <p>Can someone help me out a little?</p>