Skip to content

Instantly share code, notes, and snippets.

@astaykov
Created September 15, 2014 12:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save astaykov/c68bc86f43ba28163312 to your computer and use it in GitHub Desktop.
Save astaykov/c68bc86f43ba28163312 to your computer and use it in GitHub Desktop.
Azure Cloud Service Antimalware Protection extension
Add-AzureAccount
# use Select-AzureSubscription in case your account has more than one
Select-AzureSubscription -SubscriptionName 'PUT HERE YOUR SUBSCRIPTION'
[System.Xml.XmlDocument] $XmlConfig = New-Object System.Xml.XmlDocument
# load the Antimalware extension configuration from external XML file
# The content of the XML needs to be:
# <AntimalwareConfig><AntimalwareEnabled>true</AntimalwareEnabled></AntimalwareConfig>
# ref.: http://msdn.microsoft.com/en-US/library/azure/dn771718
$XmlConfig.load('D:\tmp\AntiMalware.config')
Set-AzureServiceAntimalwareExtension -ServiceName "PUT HERE THE CLOUD SERVICE NAME" -AntimalwareConfiguration $XmlConfig
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment