title: Input list inside variable, check is user exists, if true append to new variable Powershell
body: <p>I'm trying to make a check in Powershell where I have a list of AD users inside a variable and then check if each one of those usernames exist in AD.  If they do it will add those to another variable and if it doesn't it will output those to stdout that it's not found.</p>
  
  <p>For example the input variable would be something like:</p>
  
  <pre><code>$CHECKUSERS = bakerc fosterv englesp
  </code></pre>
  
  <p>And if bakerc and englesp exist in AD using Get-ADUser (or a different command if there is a better option) it would then add them to another variable like:</p>
  
  <pre><code>$VERIFIEDUSERS = bakerc englesp
  </code></pre>
  
  <p>It then outputs fosterv to stdout:</p>
  
  <pre><code>fosterv not found
  </code></pre>