title: Machine level environment variable not available after setting in Powershell
body: <p>The following code does not return "Y" as expected. Only in the next session (another new window) it works? I would expect it to be available immediately?</p>
  
  <pre><code>    [Environment]::SetEnvironmentVariable("X", "Y", "Machine")
      Write-Host $env:X
  </code></pre>