title: How to set a variable in powershell then get variable from cmd
body: <p>I'm executing a powershell script from cmd window. Within the powershell script I want to set a variable that later can be reached from cmd window, once the ps script has finsihed.
  How do I do that?</p>
  
  <p>I have tried:<br>
  PS promt: Set-Variable -Name "MyParameter" -Value "MyParameter1234" -Scope Global -Visibility Public
  CMD promt: set MyParameter</p>
  
  <p>Please help me figure this out.</p>