It’s very simply task.
Just use next command:
$env:TEST = "test_value"
where TEST is a name of environment variable and test_value – value for this variable.
If you want to check, use
Get-Item Env:your_env_var_nameor
Get-ChildItem Env:
if you want to get all environment variables.