title: How do i search AD for names like the ones in the "Computers" OU and then move those computers over to their proper location?
body: <p>I would like to search Active Directory for a computer with a name like WEB2309 that is currently in "Computers" OU then move it to where other computers have like names.</p>
  
  <p>This what i have currently:</p>
  
  <p><strong>Takes First member of Computers group</strong></p>
  
  <pre><code>$strFirstMember = get-adgroupmember "Computers"
  </code></pre>
  
  <p><strong>Cuts off the last number of the first member</strong></p>
  
  <pre><code>$strFirstMember-1 = $strFirstMember.Substring(0,$strFirstMember.Length-1)
  </code></pre>
  
  <p><strong>Searches for that on AD with a wildcard on the end to find like names</strong></p>
  
  <pre><code>Get-ADObject -Filter { CN -like "$strFirstMember-1*" ObjectClass = "Computer"}
  </code></pre>
  
  <p>Now i need to move firstmember to the location that is found</p>