We are using Cloud Service Classic (still - for now) as a deployment model for a number of our websites. While migration to something else is on the cards, it's not yet. We activated the antimalware extension via the Azure portal - and here's where the issues started.
Our CI/CD system completes builds nightly and deploys them to QA servers using API. The deployment bit has worked fine and still is. However this deployment creates hundreds of thousands of small files on the actual servers (nothing we can do about - this is part of the 3rd party platform being used). As a result, the antimalware extension is scanning every file and the deployment takes hours to complete. Without Antimalware the deployment takes about 1 hour. With it enabled - close to 5 hours.
Based on how our deployments work, it's safe to disable the antimalware before the deployment, complete the deployment, then re-enable it again. Yet, I can't find any way to do it from our CI scripts. The only reference I see are the powershell cmdlets Set-AzureServiceAntimalwareExtension
and Remove-AzureServiceAntimalwareExtension
- yet these have been removed from the Azure Powershell quite some time ago - and I can't find the version that still has it.
What other options are there? How can I disable/enable Antimalware extension on Cloud Service from a CI script?