title: variable set in Windows Powershell of Jenkins build, not available in other build steps
body: <p>I have a Jenkins build with one parameter called VERSION.</p>
  
  <p>Based on the length of the variable i am modifying its value in Windows Powershell and then in the next build step, i want to use it.</p>
  
  <p>But the modified value is not being reflected in the next build step execution, it still refer to the intial value entered as a parameter. I tried ENV,script,global none of them seems to work.</p>
  
  <p>Windows powershell build step</p>
  
  <p>input VERSION=1810(via jenkins build)</p>
  
  <pre><code>           if ("$ENV:VERSION".length -eq 4)
          {
             $ENV:VERSION = "$ENV:VERSION",3 -join ""  (here it will be 18103)
           }
  
           Write-Output "$ENV:VERSION" (18103 here aswell)
  </code></pre>
  
  <p>later in the Nexus artifact uploader i refer to this variable as ${VERSION} and the above updated value is not being reflected </p>
  
  <pre><code>                 (here it is 1810 and not 18103) 
  </code></pre>
  
  <p>Please help</p>