marty Posted January 17, 2011 Posted January 17, 2011 Is it possible to pipe the results of a 'dsquery' of users of a particular security group and then pipe results to 'dsmod addmbr' script? If so can somebody show me an example please?
djwingfield Posted January 17, 2011 Posted January 17, 2011 Hi, i use a dsget Script with a dsmod pipe, to activate exams accounts on and off, like shown below. Exam Users - Enable dsget group "cn=10rggn,ou=Controlled Assesments,ou=Exam Users,ou=Users,ou=School,dc=school name,dc=org,dc=UK" -members | dsmod user -disabled no Exam Users - Disable dsget group "cn=10rggn,ou=Controlled Assesments,ou=Exam Users,ou=Users,ou=School,dc=school name,dc=org,dc=UK" -members | dsmod user -disabled yes As you can see dsget looks up the users in the 10rggn group then dsmod change the accounts to enable or disable. Dan 1
marty Posted January 17, 2011 Author Posted January 17, 2011 Absolutely super smashing great. Thanks Dan!
marty Posted January 19, 2011 Author Posted January 19, 2011 For those interested I ended up using this: dsget group "CN=SIMS Y11_DT1,OU=LJS,OU=Establishments,DC=abbeycourt,DC=internal" -members | dsmod group "CN=cachepilot,OU=LJS,OU=Establishments,DC=abbeycourt,DC=internal" -addmbr It queries for the members of the SIMS Y11_DT AD security group and adds them to the cachepilot security group.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now