+ Post New Thread
Results 1 to 6 of 6
Scripts Thread, Script to remove users from one group and add to another in Coding and Web Development; Hello all! I didn't know where to post this as it is scripting but for Windows Server 2003. Basically we ...
  1. #1

    Join Date
    Nov 2011
    Location
    In the server room... cursing like a madman
    Posts
    32
    Thank Post
    11
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Script to remove users from one group and add to another

    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!

  2. #2

    Join Date
    Nov 2011
    Location
    In the server room... cursing like a madman
    Posts
    32
    Thank Post
    11
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    Postscript:

    The group I am referring to are security groups, to alleviate any confusions.

  3. #3
    Sandman's Avatar
    Join Date
    Apr 2009
    Location
    London,UK/New York,USA
    Posts
    133
    Thank Post
    2
    Thanked 16 Times in 15 Posts
    Rep Power
    13
    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

  4. #4
    Sandman's Avatar
    Join Date
    Apr 2009
    Location
    London,UK/New York,USA
    Posts
    133
    Thank Post
    2
    Thanked 16 Times in 15 Posts
    Rep Power
    13
    I just noticed the second post saying "security group"....

    this may help instead - Adding and removing users from security groups using VbScript - Scripting / VBScript for Windows

  5. #5

    Join Date
    Nov 2011
    Location
    In the server room... cursing like a madman
    Posts
    32
    Thank Post
    11
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    Thank you for your response.

    I'll have a crack at it. It seems exactly what I'm looking for.

  6. #6

    Dos_Box's Avatar
    Join Date
    Jun 2005
    Location
    Preston, Lancashire
    Posts
    9,787
    Thank Post
    572
    Thanked 2,154 Times in 982 Posts
    Blog Entries
    23
    Rep Power
    626
    Moving to scripts forum.

SHARE:
+ Post New Thread

Similar Threads

  1. remove seetings from old group policy
    By Uraken in forum Windows Server 2000/2003
    Replies: 3
    Last Post: 8th May 2009, 10:58 PM
  2. Outlook remove user from mail options.
    By jmair in forum Office Software
    Replies: 2
    Last Post: 15th July 2008, 05:02 AM
  3. Remove users from group after a set time automatically
    By markwilliamson2001 in forum How do you do....it?
    Replies: 9
    Last Post: 5th July 2008, 08:27 PM
  4. Replies: 3
    Last Post: 3rd October 2007, 01:57 PM
  5. Bulk Remove Users from OU?
    By indiegirl in forum How do you do....it?
    Replies: 11
    Last Post: 17th August 2006, 03:23 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •