In Windows Server 2019 I'm trying to set as a system variable with another variable within it, and it is not expanding.
To duplicate issue
[System.Environment]::SetEnvironmentVariable('COOKIE_VALUE','myCookies' , 'MACHINE')
[System.Environment]::SetEnvironmentVariable('RABBITMQ_SERVER_ERL_ARGS','-setcookie %COOKIE_VALUE%' , 'MACHINE')
Then reboot.
Open dos prompt and type
echo %RABBITMQ_SERVER_ERL_ARGS%
On Windows 2019 the response is: -setcookie %COOKIE_VALUE%
But in Windows 2012R2 the response is: -setcookie myCookies
Is there a way to change the behavior of how Windows 2019 handles nested variables?
Thanks in advance.