+ 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
    10

    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. IDG Tech News

  3. #2

    Join Date
    Mar 2008
    Location
    Woking
    Posts
    2,094
    Blog Entries
    4
    Thank Post
    86
    Thanked 302 Times in 249 Posts
    Rep Power
    98
    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.

  4. #3

    Join Date
    Jan 2006
    Location
    Surburbia
    Posts
    2,039
    Thank Post
    69
    Thanked 275 Times in 218 Posts
    Rep Power
    97
    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.

  5. #4
    DrPerceptron's Avatar
    Join Date
    Dec 2008
    Location
    In a house
    Posts
    670
    Thank Post
    19
    Thanked 84 Times in 70 Posts
    Rep Power
    28
    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, 12:08 PM
  2. Replies: 0
    Last Post: 17th February 2008, 01:58 AM
  3. bad move?
    By geekwannab in forum Networks
    Replies: 5
    Last Post: 12th February 2008, 11: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
  •