I am using ssm login for logging into my windows server 2016 data center edition. When I make a RDP connection and run PowerShell from RDP, All the system environment variables are loded correctly however the same fails to load when using a aws ssm session. And I have to run command like below to load the variables.
$env:PATH=$env:PATH+';C:\Program Files\Amazon\AWSCLI\bin;C:\ProgramData\chocolatey\bin;C:\Program Files\Java\jre1.8.0_221\bin'
And it is weird that it sometimes load the variable and sometime it doesn't load the variables. Is there any way to load environment variables permanently for ssm session. Unfortunately, I couldn't generate the error now when I am posting this issue here but will update once I come across this issue again.
0 Answers