GPO Scheduled Task - Taskkill

I want to deploy a group policy to run a scheduled task at 9 PM each night to run a taskkill command. I only need it executed if the user is logged on, and I'd prefer to not have to enter credentials for the command that might change later, even though that's not as big a deal. I've had a devil of a time getting it to deploy, using either user configuration or computer configuration. Basically, I can't get anything to work so far. I only want it to run based on the user logged in, not at a whole machine level. What's the proper way of getting a command scheduled for users that I've added to a security group to run this command at a certain time?

BTW, I've noticed that whenever I establish a time in in AD it puts it one hour ahead of the time I specified, even though I see nothing at the server level that has inconsistencies with DST or the like.
js0873xAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

William MillerIT SpecialistCommented:
You should be able to load up Task Scheduler and configure everything from there. Have you created a script to run for this task? If so, you should be able to setup a scheduled time to run the script and enact it upon a security group. What steps have you taken so far in an attempt to run the taskkill operation?
0
js0873xAuthor Commented:
Here's what I did:

I set up a security group  and added 3 users to it
I added a GPO and linked it to the OU with security filtering to Authenticated Users (Read) and the new security group
The GPO used User Configuration / Preferences / Control Panel Settings / Scheduled Tasks
The scheduled task does not have "run as" so as to not need credentials (even though I've tried credentials without much luck either)
The task is under Run: taskkill with the parameters it needs as arguments
0
arnoldCommented:
What is the result of your setting?
Another option using a user GPO and login/logout process
Login will create the schtasks and schedule it
Logout will delete the task.

specifics are missing, are you trying to force user to logoff.

Your issue might be the reference to the batch file where taskkil is envoked or the parameters you are setting with your schedule get misinterpreted ir running into an issue...
0
Redefine Your Security with AI & Machine Learning

The implications of AI and machine learning in cyber security are massive and constantly growing, creating both efficiencies and new challenges across the board. Check out our on-demand webinar to learn more about how AI can help your organization!

js0873xAuthor Commented:
How do you create a scheduled task at the login time and delete it at log off?  

And an option to force a log off might be decent too, although I'd only want that on certain machines, not necessarily tied to the user.

The taskkill command I'm wanting to issue is simple. It's like this: Taskkill /IM prowin32.exe /F
0
William MillerIT SpecialistCommented:
How are you configuring the GPO? What are you using to launch the taskkill command when you schedule the task? Batch? When the task runs, do you see any corresponding errors in the Event Log? Does the task attempt to run at all?
0
js0873xAuthor Commented:
I believe it attempted to run but I got this in the event viewer:

The user 'FIMS Log Off at 10 PM' preference item in the 'FIMS Log Off at 10 PM {1327EFB3-7D06-48D4-BA58-63C5D78FA352}' Group Policy object did not apply because it failed with error code '0x80070005 Access is denied.' This error was suppressed.
0
William MillerIT SpecialistCommented:
Unfortunately, the error you're receiving is due to authentication. So for this GPO to run properly, you'll either need a credential for it to run against or it would need to run on an account that has that access. Likely your GPO is just fine, but it doesn't have the elevation to perform the task.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Seth SimmonsSr. Systems AdministratorCommented:
No comment has been added to this question in more than 21 days, so it is now classified as abandoned.

I have recommended this question be closed as follows:

Accept: William Miller (https:#a42348990)

If you feel this question should be closed differently, post an objection and the moderators will review all objections and close it as they feel fit. If no one objects, this question will be closed automatically the way described above.

seth2740
Experts-Exchange Cleanup Volunteer
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows Server 2008

From novice to tech pro — start learning today.