title: Passing variables to powershell script block in a jenkins pipeline
body: <p>Is there a way to use groovy variables inside a powershell script? My sample script is as following.. </p>
  
  <pre><code>  node {
    stage('Invoke Installation') {
    def stdoutpowershell
    def serverName = env.fqdn
    withEnv(['serverName =  $serverName']) {
        echo "serverName : $serverName"
        stdoutpowershell = powershell returnStdout: true, script: '''
            write-output "Server is $env:serverName"
        '''
    }
    }
  </code></pre>