antivirus extension for cloud services extend in azure

Lior Tomer 25 Reputation points
2024-07-02T08:59:16.3+00:00

How do I add an antivirus extension like Symantec or ESET to cloud services extend?

Azure Cloud Services
Azure Cloud Services
An Azure platform as a service offer that is used to deploy web and cloud applications.
701 questions
Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
7,987 questions
{count} votes

1 answer

Sort by: Most helpful
  1. kobulloc-MSFT 26,346 Reputation points Microsoft Employee
    2024-07-02T15:44:46.8633333+00:00

    Hello, @Lior Tomer !

    How do I add an antivirus extension like Symantec or ESET to Azure Cloud Services (extended support)?

    You can enable and configure Microsoft Antimalware for Azure Cloud Services using PowerShell:

    https://learn.microsoft.com/en-us/azure/cloud-services-extended-support/extensions#anti-malware-extension

    • Windows Server 2012 R2 and older: Microsoft Antimalware is installed in a disabled state in the Cloud Services platform running Windows Server 2012 R2 and older which requires an action by an Azure application to enable it.
    • Windows Server 2016 and above: Windows Defender is enabled by default. These cmdlets can be used for configuring Antimalware.
    # Create Antimalware extension object, where file is the AntimalwareSettings
    $xmlconfig = [IO.File]::ReadAllText("C:\path\to\file.xml")
    $extension =  New-AzCloudServiceExtensionObject  -Name "AntimalwareExtension" -Type "PaaSAntimalware" -Publisher "Microsoft.Azure.Security" -Setting $xmlconfig -TypeHandlerVersion "1.5" -AutoUpgradeMinorVersion $true
    
    # Get existing Cloud Service
    $cloudService = Get-AzCloudService -ResourceGroup "ContosOrg" -CloudServiceName "ContosoCS"
    
    # Add Antimalaware extension to existing Cloud Service extension object
    $cloudService.ExtensionProfile.Extension = $cloudService.ExtensionProfile.Extension + $extension
    
    # Update Cloud Service
    $cloudService | Update-AzCloudService
    

    Additional reading:


    I hope this has been helpful! Your feedback is important so please take a moment to accept answers.

    If you still have questions, please let us know what is needed in the comments so the question can be answered. Thank you for helping to improve Microsoft Q&A!

    User's image


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.