Jump to content

Recommended Posts

Posted

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?

Posted

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

  • Thanks 1
Posted

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.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...