I've just set a couple of variables in Windows 10 using the control panel.
Variable: TWILIO_ACCOUNT_SID Variable Value: my_account_sid
Variable: TWILIO_AUTH_TOKEN Variable Value: my_twilio_auth_token
I do refreshenv in powershell so I can see the new values.
But when I do:
Write-Output "$TWILIO_ACCOUNT_SID" Write-Output "$TWILIO_ACCOUNT_SID" I just get blank lines instead of the values. What am I doing wrong?
1 Answer
In Powershell you can use the ENV:VariableName drive to call environment variables.
Example:
Get-ChildItem ENV:systemroot Name Value ---- ----- SystemRoot C:\WINDOWS In your case you can call it as Write-Output "ENV:TWILIO_ACCOUNT_SID"