www.vmwareadmins.com

how many VMs can you put in a box?

  • Increase font size
  • Default font size
  • Decrease font size
Home Articles Bulk add computers to active directory group using powershell

Bulk add computers to active directory group using powershell

E-mail Print PDF
Needed to go through the environment and find all the computers per datacenter and add them to their respective security groups so they would get wsus group policy applied to them:
 
So i had to search for a list of computers using powershell, then add that very same list of computers to an active directory group 
 
$pcs= Get-ADComputer -LDAPFilter "(name=sue*)" -SearchBase "ou=thick,ou=3_workstations,DC=ccs,DC=local" foreach ($pc in $pcs)      {    Add-ADGroupMember "FHH_WSUS_WKS" $pc     }
 
 

Follow Me On...

Facebook linkedin twitter youtube