2

I have 200+ Windows 7 machines that are part of a render farm. They're all running a service that is responsible for running render farm commands on the machine.

Currently, several environment variables are set via Group Policy.

After changing environment variables in the Group Policy and restarting the machines several times (by issuing a remote command through the service), the environment variables still aren't being applied to the service.

However, if I Remote Desktop into the machines and then restart, the environment variables will be applied correctly to the service upon restart.

Is there a way for me to get these environment variables to apply correctly to services without having to Remote Desktop into 200+ machines every time I change an environment variable via Group Policy?

  • First, are you SURE they are restarting when you think they are? Second, is the environment variable applied by a computer or user GPO? Is the service running under a specific user account, or as SYSTEM? What happens if you just gpupdate /force? There is no reason to restart to get GPOs to apply. How are you checking the environment variables to see if they change? – Appleoddity Dec 20 '17 at 2:51
  • @Appleoddity Yes, they are definitely restarting. The environment variables are currently done by user GPO's. The service is running under the network admin account. I'll check on gpupdate, haven't tried that. I'm checking the environment variables by sending a job to the service that will write out the environment variables to file. – Brendan Abel Dec 20 '17 at 4:43
  • 1
    Ok. Then I would say that is the issue. You are probably applying GPO to the network admin user. But that user won’t get a policy refresh until logging in. You should apply the environment variables to the computer. Then they will be global to every user account. I think the only thing you need to change is to make it a computer policy instead of a user policy. However, if there is still a per user variable defined it will override the global computer variable. So you may need to remove the per user variable with GPO and add the computer variable with GPO. – Appleoddity Dec 20 '17 at 4:54
  • @Appleoddity Thanks. Yes, that was the issue. I created a Group Policy for the computers and the environment variables were applied (though it required 2 restarts for them to apply). If you add your comment as an answer, I'll accept it as solved. Thanks. – Brendan Abel Dec 20 '17 at 20:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.