Jump to content
  • entries
  • comments
  • views

Remove/Add Microsoft Antimalware Service from an Azure VM




Microsoft offers for free it’s antimalware service. When you create a new VM you have the option to enable it. This will install the System Center Endpoint Protection client to the VM managed by Azure. If you have added this but now you want to remove it and add some other antivirus/antimalware solution you cannot do it by just uninstalling the client from the VM. The client will auto re-insalled by Azure. There are two ways to completely uninstall the program and remove it from Azure. One is using the new Portal and one using PowerShell.


Using the Portal

  1. Go to https://portal.azure.com/
  2. Browse the VM
  3. Go to the Configuration section and click on Extensions
  4. Click the Microsoft.Azure.Security extension
  5. You can delete it using he Delete button
  6. At any time you can re-add it, by clicking the Add button at the Extensions window



Using PowerShell


First connect PowerShell to your Azure subscription, as described to this post and then:


# First check the Antimalware Service Status, you need to select the Azure VM and then get the status:
$servicename = "myVMservice"
$vmname = "myVMname"
$vm = Get-AzureVM –ServiceName $servicename –Name $vmname
Get-AzureVMExtension -Publisher Microsoft.Azure.Security -ExtensionName IaaSAntimalware -Version 1.* -VM $vm


#First remove the service from Azure
Remove-AzureVMExtension -Publisher Microsoft.Azure.Security -ExtensionName IaaSAntimalware -VM $vm


# Then uninstall the Antimalware Client from the VM
Get-AzureVM -ServiceName $servicename -Name $vmname | Set-AzureVMExtension -Publisher Microsoft.Azure.Security -ExtensionName IaaSAntimalware -Version 1.* -Uninstall | Update-AzureVM


source: http://www.e-apostolidis.gr/microsoft/remove-microsoft-antimalware-service-from-a-vm/



Recommended Comments

There are no comments to display.

Add a comment...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...