If I already deployed a VM, how can I use the VM agent to install an antivirus software from the Azure marketplace (i.e. McAfee)? There must be some Powershell command or something but everything I've tried hasn't worked.
1 Answer
From Preview Portal:
Browse -> Virtual Machines -> Select VM -> All Settings -> Extensions -> Add -> Select Extension -> Create.
Using Powershell:
https://msdn.microsoft.com/en-us/library/azure/dn606311.aspx
Each extension has different pre-requisites so it's not only a matter of installing the extension using powershell commands. Check the above list for instructions for each one.
Guide for Mcaffee
Create this file under c:\mcafee.config. This config is for a trial account. If you have a subscription check the above link.
{
"featureVS": "true",
"featureBP": "true",
"featureFW": "true",
"relayServer": "false"
}
Execute on powershell:
# Get the VM
$vm = Get-AzureVM –ServiceName $servicename –Name $name
# Add McAfee Endpoint Protection to the Virtual Machine
Set-AzureVMExtension -Publisher McAfee.EndpointSecurity -ExtensionName McAfeeEndpointSecurity -Version 6.* -VM $vm.VM -PublicConfigPath c:\mcafee.config
# Update the VM which will install the McAfee Endpoint Protection Agent
Update-AzureVM -Name $servicename -ServiceName $name -VM $vm.VM