title: How do I pass multiple string parameters to a PowerShell script?
body: <p>I am trying to do some string concatenation/formatting, but it's putting all the parameters into the first placeholder.</p>
  
  <p><strong>Code</strong></p>
  
  <pre><code>function CreateAppPoolScript([string]$AppPoolName, [string]$AppPoolUser, [string]$AppPoolPass)
  {
      # Command to create an IIS application pool
      $AppPoolScript = "cscript adsutil.vbs CREATE ""w3svc/AppPools/$AppPoolName"" IIsApplicationPool`n"
      $AppPoolScript += "cscript adsutil.vbs SET ""w3svc/AppPools/$AppPoolName/WamUserName"" ""$AppPoolUser""`n"
      $AppPoolScript += "cscript adsutil.vbs SET ""w3svc/AppPools/$AppPoolName/WamUserPass"" ""$AppPoolPass""`n"
      $AppPoolScript += "cscript adsutil.vbs SET ""w3svc/AppPools/$AppPoolName/AppPoolIdentityType"" 3"
  
      return $AppPoolScript
  }
  $s = CreateAppPoolScript("name", "user", "pass")
  write-host $s
  </code></pre>
  
  <p><strong>Output</strong></p>
  
  <pre class="lang-none prettyprint-override"><code>cscript adsutil.vbs CREATE "w3svc/AppPools/name user pass" IIsApplicationPool
  cscript adsutil.vbs SET "w3svc/AppPools/name user pass/WamUserName" ""
  cscript adsutil.vbs SET "w3svc/AppPools/name user pass/WamUserPass" ""
  cscript adsutil.vbs SET "w3svc/AppPools/name user pass/AppPoolIdentityType" 3
  </code></pre>