Description
In this article I am going to explain about how to Create or Add System Environment variable and User Environment variable via Group Policy.
Summary
- Add System Environment variable through group policy
- Add User Environment variable through group policy
Steps to Add System Environment variable through GPO
1. Open the Group Policy Management Console by running the command gpmc.msc
2. Expand the domain node, Right-Click on the OU that contains computer objects which you are going to add Environment variable and click Create a GPO in this domain, and Link it here…
3. Type the new gpo name in the opened text box, and click OK.
4. Right-click on the newly created GPO, and click Edit.
5. Expand the Computer Configuration and got to the node Environment (Computer Configuration->Preferences->Windows Settings->Environment).
6. Right-click on the node Environment, click New->Environment Variable.
7. Ensure that the radio button System Variable is checked, fill the text box values for Name and Value, and click Apply.
8. Now, you have created new Environment variable using GPO for the computers which are inside the OU Testing Computers. You can also limit the scope of this Environment Variable by Security Filtering.
9. Click on the tab Scope, go to the section Security Filtering, now Remove the Authenticated Users entry
10. Click Add button, and Click the button Object Types in the opened dialog, and select Computers type and click OK
11. Now select the computer which you want add Environment variables through this GPO, and click OK. In this way you can add computers one-by-one to apply this gpo.
12. Now you have successfully created the Environment Variable using Group Policy, to see the value, update the GPO by running the command GPUpdate/Force.
13. Logoff the machine and Login again to see newly created Environment Variable
14. Run the command set SystemType to check the newly created Environment Variable
Steps to Create User Environment variable through GPO
1. Create the new GPO and link it the OU that contains the users which you are going to add new Environment Variable.
2. Right-Click on the GPO, and click Edit
3. Expand User Configuration, and go to the node User Configuration ->Preference ->Windows Settings ->Environment. Right-Click on the node Environment, and Click New->Environment Variable.
4. Ensure the radio button User variable is checked, fill the values for Name and Value, and Click Apply
5. You can also limit the scope of this policy to the users only who are in the Security group TestingTeam by removing the Authenticated Users Entry in Security Filtering, and add the group TestingTeam.
6. Now you have successfully created the User Environment Variable using Group Policy, to see the value, update the GPO by running the command GPUpdate/Force.
7. Logoff the machine and Login again to see the newly created Environment Variable.
Now, you have successfully created the GPO to Create Environment Variable via Group Policy
Note : This article is applies to Windows Server 2003, Windows Server 2008,Windows Server 2008 R2, Windows Server 2012, Windows 7 and Windows 8.
Related Articles
– How to Pin a Program to Start menu via Group Policy
– Create Folder on Desktop via GPO
– Pin Program to Taskbar via Group Policy
– Add desktop shortcut icon through Group Policy
– Add start menu shortcut via Group Policy
These аre really enormous ideas іn on the topic off bl&X6f;gging.
Youu have to&X75;ched some pleasant pοints here.
Anу way keep up wrint&X69;ng.
Also visit my blog Maillot om 2013
nice article
very useful, thanks to your effor
Hi my family member! I wish to say that this article is awesome,
nice written and include approximately all significant infos.
I'd like to look extra posts like this .
my page: Asian Massage ()
Thx for this article !
But I have an issue, I create a user variable and when I logon again & goes to the Environment Variable panel I can't see my user variable … any idea why ?
Hi friend, have you updated the GPO by gpupdate command?…if you already did, please restart the machine and check through command prompt using "Set" command.
Hello morgan , i have created the gpo on the domain server which updates an environment variable. where do i need to run gpupdate and logon/logoff? on the server or client pc?
sorry for late reply, you have to run on client pc
Excellent blog post. I definitely appreciate this website.
Keep writing!