troubleshooting Question

DSGet / DSMod question - Checking Membership of Group A, if so remove them from Group B

Avatar of Todd_Bain
Todd_Bain asked on
Windows Server 2003
5 Comments2 Solutions868 ViewsLast Modified:
dsget group "CN=BLAH,OU=Sites,OU=Security Groups,DC=mydomain,DC=com" -members |

Is what I know will work and allow me to pull all my users that are a part of group BLAH

But now lets pretend if they are a member of group Blah I want to keep them in Blah but also remove them from the group TEST and add then add them to another group called lets say BOB

So XUser is a member currently of BLAH and TEST Groups

I want to remove XUser from TEST and then add them to group BOB so the end result would be

XUser is a member of BLAH and BOB

What would be my dsmod command after the dsget <condensed> | command (pretending that the new security group is in the same OU as BLAH)?

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 2 Answers and 5 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 5 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros