Mr_M_Cox Posted April 12, 2011 Posted April 12, 2011 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
siuko Posted April 12, 2011 Posted April 12, 2011 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
Mr.Ben Posted April 12, 2011 Posted April 12, 2011 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?.
Mr_M_Cox Posted April 12, 2011 Author Posted April 12, 2011 We dont use Kix - I was hoping to use vbs. As GPO's I dont have access to domina level group policy, only local.
Guest Guest Posted April 12, 2011 Posted April 12, 2011 Another vote for kix - I hadnt used it till recently, but wish I had tried it earlier!
superfletch Posted April 12, 2011 Posted April 12, 2011 (edited) 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. Edited April 12, 2011 by superfletch
iMash Posted April 12, 2011 Posted April 12, 2011 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.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now