title: Searching for several Operating Systems with Get-ADComputer using LDAP Filter
body: <p>I am using the below code to get Active Directory information with <code>Get-ADComputer</code> and it works fine</p>
  
  <pre><code>$computersFilter= "(&amp;(operatingSystem=*Windows 7*)(name=*-*)(!name=V7-*)(!name=*-none)(!name=*-oncall)(!name=*-blackbaud)(!name=sc-win7-1)(!name=ut-swclient-01))"  
  
  $computers= Get-ADComputer -LDAPFilter $computersFilter -Property LastLogonDate | Select-Object Name, OperatingSystem,LastLogonDate 
  $computers | Select Name, LastlogonDate, OperatingSystem | Export-Csv $ServiceTagsPath -NoTypeInformation
  </code></pre>
  
  <p>I'd like to also retrieve computers with operating systems <strong>above Windows 7</strong> (Windows 8, 8.1, and Windows 10) but when I change the filter like this:</p>
  
  <pre><code>(&amp;(operatingSystem=*Windows 7*)(operatingSystem=*Windows 8*)(operatingSystem=*Windows 10*) ...
  </code></pre>
  
  <p>nothing is returned into the <code>$computers</code> variable</p>
  
  <p>so what's the right way to do this?</p>