Jump to content

Script to remove users from one group and add to another


Recommended Posts

Posted

Hello all!

 

I didn't know where to post this as it is scripting but for Windows Server 2003. Basically we are moving a lot of pupil's home folders from one of our old servers to a brand spanking new one. We have a GPO in place where a group of pupils will have one home folder set up and another for another, for example: Year 11 pupils will be on server 1 and Year 10 pupils will be on server 2. We now need Year 11 pupils on server 3 and wondered if there is a script that will move a certain OU of pupils from one group to another, if this makes any sense?

 

Thanks!

Posted

You could adapt something like this to work:

 

dsget user "cn=User1,ou=West,dc=MyDomain,dc=com" -memberOf | dsmod

group -addmbr "cn=User2,ou=West,dc=MyDomain,dc=com"

 

Also this link has a VBS script that may do the job (although it is for VISTA not 2000/2003):

Vista Forums

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...