Solved

Toggle Service State at Login/Logoff

Posted on 2014-01-08
6
406 Views
Last Modified: 2014-01-14
We plan to utilize our logged-off workstations for renderings (via Autodesk's Backburner software) but want it set up so that when a user logs in, their workstation is removed from the pool of available render nodes.  The easiest way to do this seems to be by stopping the Backburner service when a user logs in, and starting the service when they log out.

I know I can do this via login/logoff script ("net stop/start BACKBURNER_SRV_200"), but is there a way to do this with a GPO policy (or other)?  I've otherwise eliminated the need for login/logoff scripts and would like to avoid them if possible.  Thanks!
0
Comment
Question by:pcamis
6 Comments
 
LVL 22

Accepted Solution

by:
Matt V earned 300 total points
ID: 39766378
I think the only way you can do this is assigning a script via GPO to run at logon/logoff.  No matter how you do it, you will need the start/stop script file to do it.
0
 
LVL 53

Assisted Solution

by:Will Szymkowski
Will Szymkowski earned 200 total points
ID: 39766880
You have to be able to run this when the user logs in so a GPO startup script and a GPO logoff script would be required. You could also probably do something like this from a scheduled task as well via GPO.

GPO Scheduled Task - http://technet.microsoft.com/en-us/library/cc725745.aspx

Will.
0
 

Author Closing Comment

by:pcamis
ID: 39768582
Thanks guys - that's what I figured, but thought I'd inquire.  I like the idea of setting it via schedule, Will, but we also want to leave the possibility open of using workstations when a user is out of the office on any particular day.  Cheers!
0
Does Powershell have you tied up in knots?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

 
LVL 54

Expert Comment

by:McKnife
ID: 39771887
>   I like the idea of setting it via schedule, Will, but we also want to leave the possibility open of using workstations when a user is out of the office on any particular day.
Seems you are not familiar with task triggers. Tasks can be triggered by logon/logoff events, so that's exactly what you need.
0
 

Author Comment

by:pcamis
ID: 39779289
McKnife - looks like I jumped the gun on conceding that I was stuck with logon/logoff scripts.  Task Scheduler triggers seem to be working perfectly!  If I had a way to award extra points to you, absolutely would.  Thank you VERY much for the clarification (and again to Will for leading me in this direction).

For reference, I created two tasks:

Title: Enable Backburner
Run whether user is logged on or not / Run with highest privileges
Trigger: On an event (Log: System; Source: Winlogon; Event ID: 7002)
Action: Start a program (Program: cmd.exe; Arguments: /c "net start BACKBURNER_SRV_200")

Title: Disable Backburner
Run whether user is logged on or not / Run with highest privileges
Trigger: At log on (At log on of any user)
Action: Start a program (Program: cmd.exe; Arguments: /c "net stop BACKBURNER_SRV_200")
0
 
LVL 54

Expert Comment

by:McKnife
ID: 39779301
You're welcome and thanks for feedback.
0

Featured Post

Is Your AD Toolbox Looking More Like a Toybox?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article, I will show you HOW TO: Install VMware Tools for Windows on a VMware Windows virtual machine on a VMware vSphere Hypervisor 6.5 (ESXi 6.5) Host Server, using the VMware Host Client. The virtual machine has Windows Server 2016 instal…
When you try to extract and to view the contents of a Microsoft Update Standalone Package (MSU) for Windows Vista, you cannot extract the files from the MSU. Here we are going to explain how to extract those hotfix details without using any third pa…
In this video, we discuss why the need for additional vertical screen space has become more important in recent years, namely, due to the transition in the marketplace of 4x3 computer screens to 16x9 and 16x10 screens (so-called widescreen format). …
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question