But if you ever did need to resolve one of those kind of environment variables, you could do it like this: PS> [System.Environment]::ExpandEnvironmentVariables("%WINDIR%") C:\Windows