Skip to content

Instantly share code, notes, and snippets.

@nickcox
Last active May 17, 2023 06:50
Show Gist options
  • Save nickcox/032c5136b810f1c5e2c633ec99234c45 to your computer and use it in GitHub Desktop.
Save nickcox/032c5136b810f1c5e2c633ec99234c45 to your computer and use it in GitHub Desktop.
# set environment variables from a file
cat ./vars.env | ConvertFrom-StringData |? Values -ne @{} |% {ni -Name $_.Keys -Value $_.Values -Path env: -Force}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment