Environment Variables

Aus Wiki-WebPerfect
Wechseln zu: Navigation, Suche

Get environment variable

Get using "System.Environment" (Scope = System)

[Environment]::GetEnvironmentVariable('<VariableName>', 'Machine')



Set environment variable

Set using "System.Environment" (Scope = System)

[Environment]::SetEnvironmentVariable("<VariableName>", "<VariableValue>", 'Machine')




More informations: https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_environment_variables?view=powershell-7