Need a script that would add users to a Security Group if the Division attribute value is either "001 Inside Sales West" or "002 Inside Sales East".
here is a script so that you know what I am trying to do:
get-aduser -SearchBase ‘OU=Users,OU=City,DC=company1,DC=com’ -LDAPFilter "(&(division=001 Inside Sales West) -or (division=002 Inside Sales East))" | foreach {Add-ADGroupMember "sg-Sales-USUsers" -Member $_}
any help would be greatly appreciated, thanks
Noe