I'm using the Group Policy Management Editor to add an environment variable to our Group Policy. In general, this environment variable shouldn't already exist on the host machines, but if it does, I'd like the Group Policy setting to completely replace whatever was set on the host machine.
The Environment Variable editor gives me two similar options -- Update and Replace. The help text for both is nearly identical, both saying that it will replace the variable in the specified environment.
What is the difference between these two options? Which one should I choose to accomplish what I want?
Update; Will create the variable if it doesn't exist, or update it if it is already there, however it will only update properties you have specified in the Group Policy Preference (GPP).
Replace; Will also create the variable if it doesn't exist, but will always delete it first and recreate it if it does already exist.
The advantage of Update therefore is more applicable to 'user visible' settings/preferences such as Printer Mappings or Mapped Drives, whereby a user could specify additional settings (Such as their Default Printer for example) that they may want to retain - Using Update would allow the user to hold on to these additional settings if they're not otherwise defined in the GPP.
(For more context, see the following Techent article about mapped drives; https://blogs.technet.microsoft.com/askds/2009/01/07/using-group-policy-preferences-to-map-drives-based-on-group-membership/)