title: Powershell Select-String -pattern -notMatch
body: <p>I have lines -</p>
  
  <pre><code>echo $LocalAdmins
      Administrator
      Domain-Administrator
      daemon
      SomeUser
  </code></pre>
  
  <ul>
  <li><p>Line 1-3 should be same although there could be situation where
  Domain-Administrator doesn't exist so simply counting lines won't
  help because User might hide in 3rd line.</p></li>
  <li><p>Line 4 string changes, there could be more than 4 lines either as
  well as no Line 4 at all. </p></li>
  <li><p>I'm not sure yet if lines change their position or not.</p></li>
  </ul>
  
  <p>I need to get string that is -notMatch "Administrator", "Domain-Administrator", "daemon". I.e., I need user names that are in this list.</p>
  
  <p>Is there a way to use more than one -notMatch with -and or ()? Currently I'm stuck with code that use only one -notMatch. And I can't use -Match because there could be 2+ users in the list.</p>
  
  <pre><code>$LocalAdmins | Select-String -pattern "Administrator" -notMatch
  </code></pre>