How do you do....it? Thread, Make a script run for SINGLE domain user in Technical; have a basic script that i have put together, and it needs to run everytime she logs off, is there ...
-
15th November 2007, 02:03 PM #1 Make a script run for SINGLE domain user
have a basic script that i have put together, and it needs to run everytime she logs off, is there anyway that i could get this script to run (just for this user) when she logs off the domain?
I know there is the option of log off script for groups etc.. in AD, but not for the single user
cheers
phil
-
-
IDG Tech News
-
15th November 2007, 02:19 PM #2 Re: Make a script run for SINGLE domain user
Use GP filtering so that GPO only applies to that user.
In GPMC, create the GPO with the logoff script.
The scope tab show the Security Filtering - it list Authenticated Users by default (i.e. everyone in the OU it's linked to and below).
Click remove to remove authenticated users and click add to add the users name.
That's it - a GPO that only applies to the named user (or group or whatever you put in the filtering). You'll still need to link it to an OU that's above the named user, or it won't apply to anyone.
-
-
15th November 2007, 07:02 PM #3 Re: Make a script run for SINGLE domain user
Something a little easier, make an OU for the users concerned and apply the policy for that OU. If she is already in a OU with a policy make another OU inside that OU.
Z
-
-
15th November 2007, 08:15 PM #4 Re: Make a script run for SINGLE domain user

Originally Posted by
FN-Greatermanchester Something a little easier, make an OU for the users concerned and apply the policy for that OU. If she is already in a OU with a policy make another OU inside that OU.
Z
That would certainly work, but it's not a particularly scalable or flexible solution. IMHO, the best way to do this would be to use the filtering, but rather than putting the user account in the DACL, I would create a group, whose name matches GPO that contains the script and add the required user(s) to the script.
I try to avoid adding users to DACLS for one simple reason. When the user account gets deleted, the DACL is left with a reference to a non-existent user account. When you look at the DACL, all you see is the GUID/SID reference. You'll have no idea who/what it refers to. If you use a group of course, the group will still be there. When you want to get rid of the group, rather than deleting it, remove all the user accounts from it and rename it as UNUSED_(old group name).
-
-
15th November 2007, 08:52 PM #5 Re: Make a script run for SINGLE domain user
Why not just deploy the logoff script but within the script have an IF depending on the user variable ?
Code:
If %Username% = XYZ
Run the script
else
quit the script
You can use If from batch or better still use AutoIT to do it.....
Thats how I would do it anyhoo..........saves all the mucking around with OUs etc...
My motto - KEEP IT SIMPLE
-
-
15th November 2007, 09:21 PM #6 Re: Make a script run for SINGLE domain user
I agree with mattx that will be the best solution.
Z
-
SHARE: 
Similar Threads
-
By siuko in forum How do you do....it?
Replies: 39
Last Post: 20th June 2012, 11:29 AM
-
By link470 in forum Windows
Replies: 15
Last Post: 2nd November 2009, 05:21 PM
-
By ryan_powell in forum Scripts
Replies: 9
Last Post: 4th June 2009, 02:43 PM
-
By Uraken in forum Windows
Replies: 0
Last Post: 18th May 2007, 12:29 PM
-
By johnny in forum How do you do....it?
Replies: 8
Last Post: 23rd February 2007, 01:31 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
-
Forum Rules