Script or GPO to apply User Environment Variables to Multiple VMs in a Domain?

E

Evan.Redinger

Hello,

I'm working on a Hyper-V environment with multiple Server 2016 VMs. I need to set the default Temp & TMP file location to a different drive for multiple systems for replication purposes. (I found one script that can be used to adjust the default system tempfile location, not for the user. I can manually come in here and apply it, but this only applies for my user account. I need it to apply for the entire system.

Here's the script I found for system settings:

Set-ItemProperty -path "HKLM:System\CurrentControlSet\Control\Session Manager\Environment" -name TEMP "C:\TEMP"
Set-ItemProperty -path "HKLM:System\CurrentControlSet\Control\Session Manager\Environment" -name TMP "C:\TMP"



There's probably something I'm missing on this, I did a few hours of research on it but I'm not finding anything immediate. I'm not sure if this a Powershell Script I should be looking for, or looking for a GPO.


Thanks!

Continue reading...
 
Back
Top Bottom