We are configuring our VM with ARM. We use the DSC to install most of the requirements, however, installing the anti malware extension together with the DSC does not work.
We are getting the following error: Multiple VMExtensions per handler not supported for OS type 'Windows'. VMExtension 'dscExtension' with handler 'Microsoft.Powershell.DSC' already added or specified in input.
The resources look like this:
{
"type":"Microsoft.Compute/virtualMachines/extensions",
"name":"[concat(variables('vmName'),'/', 'antiMalwareExtension')]",
"apiVersion":"[variables('api-version')]",
"location":"[resourceGroup().location]",
"dependsOn":[
"[concat('Microsoft.Compute/virtualMachines/', variables('vmName'))]"
],
"properties":{
"publisher":"Microsoft.Azure.Security",
"type":"IaaSAntimalware",
"typeHandlerVersion":"1.1",
"settings":{
"AntimalwareEnabled":"true",
"Exclusions":{
"Paths":"C:\\Users",
"Extensions":".txt",
"Processes":"taskmgr.exe"
},
"RealtimeProtectionEnabled":"true",
"ScheduledScanSettings":{
"isEnabled":"true",
"scanType":"Quick",
"day":"7",
"time":"120"
}
},
"protectedSettings":null
}
},
{
"type":"Microsoft.Compute/virtualMachines/extensions",
"name":"[concat(variables('vmName'),'/', 'dscExtension')]",
"apiVersion":"[variables('api-version')]",
"location":"[resourceGroup().location]",
"dependsOn":[
"[concat('Microsoft.Compute/virtualMachines/', variables('vmName'))]"
],
"properties":{
"publisher":"Microsoft.Powershell",
"type":"DSC",
"typeHandlerVersion":"2.9",
"autoUpgradeMinorVersion":true,
"settings":{
"ModulesUrl":"[parameters('dscLocation')]",
"ConfigurationFunction":"[parameters('dscFunction')]",
"Properties":{
"nodeName":"[variables('vmName')]"
}
}
}