+ Post New Thread
Results 1 to 4 of 4
Scripts Thread, move user in AD in Coding and Web Development; Hello all, I have set up a OU with high restrictions setting. Sort of a user "sin-bin". I want to ...
  1. #1

    Join Date
    May 2008
    Location
    Kent
    Posts
    94
    Thank Post
    57
    Thanked 10 Times in 10 Posts
    Rep Power
    14

    move user in AD

    Hello all, I have set up a OU with high restrictions setting. Sort of a user "sin-bin". I want to allow the ICTCO easy and simple access to move a user in and out of this OU. Anyone got a VB script or suggestion on how to do this?
    many thanks and Happy Christmas.

  2. #2

    Join Date
    Mar 2008
    Location
    Surrey
    Posts
    2,168
    Thank Post
    98
    Thanked 319 Times in 261 Posts
    Blog Entries
    4
    Rep Power
    112
    An easier way might be to create a group within the bin, so that the policy applies to the group, then let them add users to that group.

  3. #3

    Join Date
    Jan 2006
    Location
    Surburbia
    Posts
    2,178
    Thank Post
    74
    Thanked 307 Times in 243 Posts
    Rep Power
    115
    dsmove.exe with a couple of arguments for moving OU.
    net.exe with a couple of arguments for adding removing from a group.

    Much of a muchness but I'd probably go for groups because net.exe syntax is easier and is already installed everywhere you might need it. The group can be anywhere, the point is to use it for security filtering on the GPOs that apply to the users i.e. SinBin group is denied apply access to normal GPO, SinBin is only group that can apply the naughty GPO.

  4. #4
    DrPerceptron's Avatar
    Join Date
    Dec 2008
    Location
    In a house
    Posts
    919
    Thank Post
    34
    Thanked 134 Times in 114 Posts
    Rep Power
    41
    Personally, I would prefer to be in control of this myself - you will know why a person is in the 'Sin Bin' and, you know that nobody can be put in there by accident etc.

    On the other hand, I don't think it's all that complex, you might need some funky string functions to work out the real OU etc...

    Code:
    strUserDN = "cn=username,ou=intake01,ou=students,dc=domain,dc=local"
    strOUDN = "ou=sinbin,ou=students,dc=domain,dc=local"
    
    Set objUser = GetObject("LDAP://" & strUserDN)
    Set objOU = GetObject("LDAP://" & strOUDN)
    objOU.MoveHere objUser.ADsPath, objUser.Name

SHARE:
+ Post New Thread

Similar Threads

  1. Move Away From CMIS
    By Christof in forum MIS Systems
    Replies: 2
    Last Post: 8th December 2008, 11:08 AM
  2. Replies: 0
    Last Post: 17th February 2008, 12:58 AM
  3. bad move?
    By geekwannab in forum Wireless Networks
    Replies: 5
    Last Post: 12th February 2008, 10:55 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
  •