title: Calling Powershell From Jenkins Pipeline with parameters
body: <p>I have a Jenkins pipeline which has a parameter that takes the branch name to build.
  Then down the line i call a powershell script , i need to pass the parameter to this scrpit , but i am not able to do the same , i have tried the below options , please check and let me know if you have any inputs/suggestions.</p>
  
  <p>i have tried with the below options already :</p>
  
  <p>powershell script: 'C:\MSG-Team\Test_Automation\Message_Router\Scripts\Update_Config_Files.ps1 {branch}'</p>
  
  <p>powershell script: 'C:\MSG-Team\Test_Automation\Message_Router\Scripts\Update_Config_Files.ps1 ${branch}'</p>
  
  <p>powershell script: 'C:\MSG-Team\Test_Automation\Message_Router\Scripts\Update_Config_Files.ps1 {branch}'</p>
  
  <p>powershell script: 'C:\MSG-Team\Test_Automation\Message_Router\Scripts\Update_Config_Files.ps1 ${params.Branch}'</p>
  
  <pre><code>node()
  {   
      def build_ok = true
      def branch = params.Branch
      echo "The branch / tag selected to build is :" + branch
  
          stage('Pre-requisite')
          {
             powershell script: 'C:\\MSG-Team\\Test_Automation\\Message_Router\\Scripts\\PreRequisite_Actions.ps1'
          }
  
          if(params.Build)
          {
              stage('Build &amp; Deploy Services')
              {               
                      try
                      {
                          echo "Stoping the existing services if any running"
                          powershell script: 'C:\\MSG-Team\\Test_Automation\\Message_Router\\Scripts\\Stop_Services.ps1'
                          echo "Stoping services Completed"
                          echo "Triggering deployment"
  
                          def Build_MSG_BOM_status               = build job: 'Build_MSG_BOM' , parameters: [string(name: 'Branch', value: params.Branch)]
                          def Build_MSG_Logging_status           = build job: 'Build_MSG_Logging' , parameters: [string(name: 'Branch', value: '1.0.5')]
                          def Build_MSG_LIB_status               = build job: 'Build_MSG_LIB' , parameters: [string(name: 'Branch', value: params.Branch)]
                          def Build_Message_Router_status        = build job: 'Build_Message_Router', parameters: [string(name: 'Branch', value: params.Branch)]
  
                          powershell script: 'C:\\MSG-Team\\Test_Automation\\Message_Router\\Scripts\\Install_MR_Service.ps1' 
  
                          echo "Deployment Completed"
  
                          echo "Updating Config Files"
                          **powershell script: 'C:\\MSG-Team\\Test_Automation\\Message_Router\\Scripts\\Update_Config_Files.ps1 ${branch}'**
                          echo "Config File Update Completed"
  
  
                      }
                      catch(e)
  </code></pre>