[ADSI]$Grp="LDAP://CN=SAPIEN Authors,OU=SAPIEN,DC=MyCompany,DC=local" $NewUserDN="CN=Jeffery Hicks,OU=IT,OU=Employees,DC=MyCompany,DC=local" #create an array object from current group members $grpMembers=@($Grp.Member) #display current group membership Write-Host "There are currently $($grpMembers.Count) members in $($Grp.Name)" -foregroundcolor cyan foreach ($user in $grpMembers) {$user} Write-Host `n; Write-Host "Adding $NewUserDN" -foregroundcolor cyan ($grp.Member).add($NewUserDN) > $NULL #commit changes to Active Directory $Grp.SetInfo() #refresh object and display new membership list $Grp.refreshCache() $grpMembers=@($grp.Member) #display new membership Write-Host "There are now $($grpMembers.Count) members in $($grp.Name)" -foregroundcolor cyan foreach ($user in $grpMembers) { if ($user -eq $NewUserDN) { Write-Host $user -foregroundcolor Green } else { write-Host $user -foregroundcolor Yellow } }