GetEnvironment
GetEnvironment["var"] gives the setting corresponding to the variable "var" in the operating system environment.
GetEnvironment[{var1,var2,…}] gives a list of rules, corresponding to specified environment variables.
GetEnvironment[] gives information about all existing settings in the operating system environment.
Please visit the official Wolfram Language Reference for more details and examples on core symbols.