title: Powershell create AD Users in different OUs using csv
body: <p>I've got an problem creating new users in Active Directory.
  I've got a .csv file where I specified as one of many headers "location" with the City where the User will be situated, now I want to create the user in an OU that matches the "location" entry.</p>
  
  <p>For example: "Location" is Dresden and OU is "OU=Users,OU=Dresden,OU=Germany,DC=acme,DC=com" </p>
  
  <p>The same when location is "Munich"
  "OU=Users,OU=Munich,OU=Germany,DC=acme,DC=com" </p>
  
  <p>I played around with Wildcars etc. but it seems there is a missing link in my brain, how can I create a variable- coming from the matching correct OU to set the correct -path command?</p>
  
  <pre><code>    $Domain   = 'dc=acme,dc=com'
  $OUs = @( #what to put in here to make this to a matching variable?
    "OU=Users,OU=Munich,OU=Germany,",
    "OU=Users,OU=Munich,OU=Germany,",
  
  )
  </code></pre>
  
  <p>Not sure If you can get my problem now :)</p>
  
  <p>Dschordge</p>