Environment variables via GPO

HM 26 Reputation points
2020-08-04T17:39:44.137+00:00

We have a server hosting an application. Users are connecting to this server using published applications on Citrix and launching the command prompt. We want that users should get an office_code as per their machine office location as per sites and services. We tried below scenarios :-

  1. System variable : Its not working and we don't see the environment variable for user
  2. User variable : It gives error during gpupdate /force on command prompt (published app) . Although gpresult shows that policy is applied but still we don't see it. We also enabled the loopback using 'Replace' mode but still no luck

Users/Machines are in different domain C and Server is in different domain B. All part of same forest.

My question is : First of all is this scenario possible and if yes what are we missing here

Windows
Windows
A family of Microsoft operating systems that run across personal computers, tablets, laptops, phones, internet of things devices, self-contained mixed reality headsets, large collaboration screens, and other devices.
5,482 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Hannah Xiong 6,276 Reputation points
    2020-08-05T02:02:22.01+00:00

    Hello,

    Thank you so much for posting here.

    So sorry that I do not clearly understand how we configured this GPO. According to our description, there is error during running gpupdate /force. What is the error message?

    Besides, as mentioned, the gpresult shows that policy but the setting not applied. We could run “gpresult /h” to get a detailed group policy result report, then check if the specific settings get applied or not. Is there any error message when we check the result report?

    To troubleshoot Group Policy, we could refer to:
    https://learn.microsoft.com/en-us/archive/blogs/grouppolicy/troubleshooting-group-policy

    Thank you so much for your support.

    Best regards,
    Hannah Xiong


  2. HM 26 Reputation points
    2020-11-23T19:49:57.117+00:00

    sorry for late update. We fixed it using LDAP query for user's location . So based on user's location it applied the env variable for the user

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.