I'm using Azure's Batch services to unzip very large zip files before processing the unzipped files then deleting them. Unfortunately Windows Defender, which is preinstalled on the Azure VM's I'm using, will lock certain files so they can't be deleted - I imagine it's scanning them for viruses. I know it's Windows Defender locking the files as I ran a process monitor on the VM and isolated the process.
I've tried stopping Windows Defender as part of the batch job's preparation tasks but despite setting the elevation levels to Admin I still have no luck - access is denied.
Any help in disabling Windows Defender on an Azure VM via Batch services would be appreciated.