This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Set your subscription | |
az account set --subscription "<YOUR_SUBSCRIPTION_ID>" | |
# Keep Defender for Storage V2 on, but disable ONLY malware scanning | |
az security pricing create \ | |
--name StorageAccounts \ | |
--tier Standard \ | |
--subplan DefenderForStorageV2 \ | |
--extensions name=OnUploadMalwareScanning isEnabled=False \ | |
--extensions name=SensitiveDataDiscovery isEnabled=True |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Requires Az.Accounts, Az.Security | |
# Connect-AzAccount | |
Set-AzContext -Subscription "<YOUR_SUBSCRIPTION_ID>" | |
# Disable ONLY malware scanning at the subscription level | |
# (keeps the Defender for Storage plan and Sensitive Data Discovery as-is) | |
Set-AzSecurityPricing ` | |
-Name "StorageAccounts" ` | |
-PricingTier "Standard" ` | |
-SubPlan "DefenderForStorageV2" ` |