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?
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?
Hi, i use a dsget Script with a dsmod pipe, to activate exams accounts on and off, like shown below.
Exam Users - Enable
Exam Users - DisableCode: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
As you can see dsget looks up the users in the 10rggn group then dsmod change the accounts to enable or disable.Code: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
Dan
marty (17th January 2011)
Absolutely super smashing great. Thanks Dan!
For those interested I ended up using this:
It queries for the members of the SIMS Y11_DT AD security group and adds them to the cachepilot security group.Code: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
There are currently 1 users browsing this thread. (0 members and 1 guests)