title: Check AD Computer Names against CSV file
body: <p>I'm trying to write a Powershell script that will import a list of computer names from a CSV file and compare it against all computer names in AD. I need it to output a list of names from the CSV file that do not exist in AD.</p>
  
  <p>I have been playing around with these commands but they don't do exactly what I want.</p>
  
  <pre><code>$import = Import-Csv -Path C:\Users\username\Desktop\test.csv
  $AD-Names = Get-ADComputer -filter * | Select -Expand Name
  Compare-Object $import $AD-Names
  </code></pre>
  
  <p>This seems to give me a list of everything different from both variables which is an extremely long list. I really just need to know which computer names in the CSV file are not in AD.</p>