As I’ve been configuring a bit of folder redirection in group policies, I often forget what environment variables there are (there’s a lot more than you ever realise!) So I thought I’d list some environment variables that may be useful when editing GPOs or registry settings, and what they resolve to by default (assuming I’m logged in to the domain contoso.com as CONTOSO\Katy from contoso-wk-1), with my home drive set to map N: to \\file.contoso.com\users\katy
You can view the full list of environment variables for the currently logged on user on your system by opening a command prompt and running “set”. You can also see them by going into System Properties -> Advanced -> Environment Variables however this will show you the variables in the SYSTEM context, i.e. %USERNAME% will show as SYSTEM.
|%ONEDRIVE%||C:\Users\katy\OneDrive – Contoso|