When using PowerShell, you can use setx.exe to set environment variables permanently.
Start PowerShell
Type one of the following:
setx ASPNETCORE_ENVIRONMENT "development"
setx ASPNETCORE_ENVIRONMENT "staging"
Restart PowerShell