Getting different env variables depending on session. Elastic beanstalk windows server core

I am using elastic beanstalk on windows server core and running in to a weird issue: If I try to access global env variables while using ebextensions it can’t find them. But when I console in to the server I can see them just fine with the exact same command. Example: I have a env variable set in EB for my new relic license key. New Relic picks it up just fine. I can console in and see the variable. But if I reference that variable in an ebextension command, it can’t find it.

So the general question is:
Is there some type of different namespace or session types that get access to different variables? And if so, how can I tell which I am in?

Source: Windows Questions