+ Post New Thread
Results 1 to 7 of 7
Windows Thread, Script help needed in Technical; Hi all, I need a script that will look at the OU membership of a user logging on and then ...
  1. #1
    Mr_M_Cox's Avatar
    Join Date
    May 2007
    Location
    Portsmouth
    Posts
    155
    Thank Post
    5
    Thanked 1 Time in 1 Post
    Rep Power
    0

    Script help needed

    Hi all,

    I need a script that will look at the OU membership of a user logging on and then depending on which OU their account is in it runs either bat file 1 or 2.

    Any ideas?

    Thanks all

  2. #2

    Join Date
    Dec 2005
    Posts
    542
    Thank Post
    38
    Thanked 90 Times in 80 Posts
    Rep Power
    39
    You can do this using kixscripts - do you happen to use kix already?

    It just requires a kix udf to read the OU and then you can do a standard IF IN OU in your kixscript and run which bat you require

  3. #3
    Mr.Ben's Avatar
    Join Date
    Jan 2008
    Location
    A Pirate Ship
    Posts
    942
    Thank Post
    182
    Thanked 158 Times in 126 Posts
    Blog Entries
    2
    Rep Power
    65
    Can you not create 2 new Group policies with logon scripts included and modify the Security Filtering to only apply to the groups in question?.

  4. #4
    Mr_M_Cox's Avatar
    Join Date
    May 2007
    Location
    Portsmouth
    Posts
    155
    Thank Post
    5
    Thanked 1 Time in 1 Post
    Rep Power
    0
    We dont use Kix - I was hoping to use vbs.

    As GPO's I dont have access to domina level group policy, only local.

  5. #5


    Join Date
    Oct 2006
    Posts
    3,414
    Thank Post
    184
    Thanked 356 Times in 285 Posts
    Rep Power
    149
    Another vote for kix - I hadnt used it till recently, but wish I had tried it earlier!

  6. #6
    superfletch's Avatar
    Join Date
    Nov 2007
    Location
    South
    Posts
    444
    Thank Post
    153
    Thanked 77 Times in 61 Posts
    Rep Power
    31
    For vbs this link might help?

    How Can I Determine the OU a User Account Belongs To? - Hey, Scripting Guy! Blog - Site Home - TechNet Blogs

    I agree that different scripts for different OU's via GPO would work better.
    Last edited by superfletch; 12th April 2011 at 12:52 PM.

  7. #7

    Join Date
    Mar 2011
    Location
    Coventry
    Posts
    61
    Thank Post
    12
    Thanked 6 Times in 6 Posts
    Rep Power
    9
    Are you trying to run the script on everything in the domain?

    If not I would go down Mr.Bens route. Create a GPO and link it in the areas you want it applied to and then use the permissions on the GPO to allow the relevant security groups to apply the policy.

SHARE:
+ Post New Thread

Similar Threads

  1. Start Menu Script Needed
    By pritchardavid in forum Scripts
    Replies: 1
    Last Post: 15th January 2010, 12:50 PM
  2. Working Script suddenly Not! - Help Needed!
    By robinshroom in forum Scripts
    Replies: 0
    Last Post: 14th September 2009, 10:18 AM
  3. File Aging Script Needed
    By ICTNUT in forum Scripts
    Replies: 8
    Last Post: 5th September 2008, 12:56 PM
  4. Help needed writing a pkinvoice script
    By Ric_ in forum Scripts
    Replies: 6
    Last Post: 20th April 2007, 12:15 PM
  5. Replies: 12
    Last Post: 12th September 2005, 10:47 AM

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
  •