I managed to deploy this script without any problems, but I am trying to provision the VMs with a bash script using the virtualMachines/extensions. Do you have any suggestions on how to use the copyIndex in this section? I tried in several ways but I had no luck and the script fails to deploy with syntax errors.
This is the script I am trying to repurpose: <https://github.com/Azure/azure-quickstart-templates/tree/master/201-vm-copy-index-loops>. Any assistance is appreciated. Thank you.

This is the code I was using, but without the copyIndex. The script needs to pass parameters to each VM.

```
{
"type": "Microsoft.Compute/virtualMachines/extensions",
"name": "[concat(parameters('MetaPortName'),'/newuserscript')]",
"apiVersion": "2020-06-01",
"location": "[parameters('location')]",
"dependsOn": [
"[resourceId('Microsoft.Compute/virtualMachines/', parameters('MetaPortName'))]"
],
"properties": {
"publisher": "Microsoft.Azure.Extensions",
"type": "CustomScript",
"typeHandlerVersion": "2.0",
"autoUpgradeMinorVersion": true,
"settings": {
"fileUris": ["https://raw.githubusercontent.com/willguibr/azure/main/MetaPort-Standalone-NATGW-v1.0/install_metaport.sh"]
},
"protectedSettings": {
"commandToExecute": "[concat('sh install_metaport.sh ', parameters('MP1TokenCode'), parameters('MP2TokenCode'))]"
}
}
}

```