title: Convert array parameter values to comma separated string
body: <p>I am deploying Vms to Azure with an ARM template. In my parameters file I have:</p>
  
  <pre><code>"nodePrivateIps": {
    "value": [
      { "IpAddress": "10.0.10.1" },
      { "IpAddress": "10.0.10.2" },
      { "IpAddress": "10.0.10.3" }
    ]
  },
  </code></pre>
  
  <p>I am able to use this array in the template with:</p>
  
  <pre><code>"privateIPAddress": "[parameters('nodePrivateIps')[copyIndex()].IpAddress]",
  </code></pre>
  
  <p>Problem is now I need to pass that same array to my powershell script by using a CustomScriptExtension but it doesn't seem to like the array parameter. </p>
  
  <pre><code>"properties": {
          "publisher": "Microsoft.Compute",
          "type": "CustomScriptExtension",
          "typeHandlerVersion": "1.4",
          "settings": {
            "fileUris": [
              "[concat(parameters('_artifactsLocation'),'/SolrCloudSetup.ps1', parameters('_artifactsLocationSasToken'))]"
            ],
            "commandToExecute": "[concat('powershell.exe -ExecutionPolicy Unrestricted -Command .\\SolrCloudSetup.ps1 ', parameters('nodePrivateIps'))]"
          }
        }
  </code></pre>
  
  <p>This is my powershell script parameter that's currently expecting an array. I can easily change that to comma separated string if I get the ARM to cooperate.</p>
  
  <pre><code># SolrCloudSetup.ps1 -----------------------
  param (
     [array] [Parameter(Mandatory=$true)] $solrNodeIps
  )
  </code></pre>
  
  <p>Is there a way to convert this array parameter into a comma separated string so that I can pass it through the CustomScriptExtension to my powershell script?</p>