Let's say I want to make a User account a member of 3 groups through the object picker of the AD tools (the "Select Groups" window), and that I add in the "Enter the object names to select" box/field the names of 3 groups, the lookup of which won't result in unique objects...

Example: I want to add the User account to:
SupportGroup Application01 User
SupportGroup Application02 User
SupportGroup Application03 User
which all exist but there also happen to exist the following groups:
SupportGroup Application01 User - Admin
SupportGroup Application02 User - Admin
SupportGroup Application03 User - Admin

Is there a way to make sure it will directly resolve only to the names we provided (that is, the shortest matches)?

For instance, that it directly selects "SupportGroup Application01" without making me choose between it and "SupportGroup Application01 User - Admin"?

Separating each name by semi-colons, or enclosing them in quotes doesn't help...

Thanks in advance!


There is no such way. You expect too much from Microsoft's simple GUI.

It would have helped had you provided any use context (ie. description of what you need this for). As far as you're the clicking guy, I'd generally say PowerShell does the trick much faster than UI and allows wildcards the way you need them:

Get-ADGroup -LDAPFilter "(name=SupportGroup Application* User)" | Add-ADGroupMember -Members <myobject>

Or, if you're operating on a specific plaintext list separated with semicolons, try this one:

"Group 1;Group 2;Group 3" -split ";" | Get-ADGroup | ADGroupMember -Members <myobject>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.