Set-AzSecurityPricing
在 Microsoft Defender for Cloud 中啟用或停用訂用帳戶的 Microsoft Defender 方案。
注意
針對 CloudPosture (Defender Cloud Security Posture Management),使用此命令時,將不會啟用無代理程式擴充功能。 若要啟用擴充功能,請使用適用於雲端社群存放庫的 Microsoft Defender中的 Azure 原則定義或腳本。
語法
Set-AzSecurityPricing
-Name <String>
-PricingTier <String>
[-SubPlan <String>]
[-Extension <String>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Set-AzSecurityPricing
-InputObject <PSSecurityPricing>
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
啟用或停用訂用帳戶的任何 Azure Defender 方案。
如需 Azure Defender 和可用方案的詳細資訊,請參閱 Azure Defender簡介。
範例
範例 1
Set-AzSecurityPricing -Name "AppServices" -PricingTier "Standard"
範例 2
Set-AzSecurityPricing -Name "VirtualMachines" -PricingTier "Standard" -SubPlan P2
範例 3
Set-AzSecurityPricing -Name "CloudPosture" -PricingTier "Standard" -Extension '[{"name":"SensitiveDataDiscovery","isEnabled":"True","additionalExtensionProperties":null},{"name":"ContainerRegistriesVulnerabilityAssessments","isEnabled":"True","additionalExtensionProperties":null},{"name":"AgentlessDiscoveryForKubernetes","isEnabled":"True","additionalExtensionProperties":null},{"name":"AgentlessVmScanning","isEnabled":"True","additionalExtensionProperties":{"ExclusionTags":"[{\"key\":\"Microsoft\",\"value\":\"Defender\"},{\"key\":\"For\",\"value\":\"Cloud\"}]"}}]'
為訂用帳戶啟用適用於伺服器 的 Azure Defender
「標準」是指 Azure Defender 方案的「開啟」狀態,如 Azure 入口網站的 Azure 資訊安全中心定價和設定區域所示。
參數
-Confirm
在執行 Cmdlet 之前,提示您進行確認。
類型: | SwitchParameter |
別名: | cf |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-DefaultProfile
用於與 Azure 通訊的認證、帳戶、租用戶和訂用帳戶。
類型: | IAzureContextContainer |
別名: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-Extension
方案下提供的延伸模組
類型: | String |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-InputObject
Input 物件。
類型: | PSSecurityPricing |
Position: | Named |
預設值: | None |
必要: | True |
接受管線輸入: | True |
接受萬用字元: | False |
-Name
資源名稱。
類型: | String |
Position: | Named |
預設值: | None |
必要: | True |
接受管線輸入: | False |
接受萬用字元: | False |
-PricingTier
定價層。
類型: | String |
Position: | Named |
預設值: | None |
必要: | True |
接受管線輸入: | False |
接受萬用字元: | False |
-SubPlan
子計劃。
類型: | String |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-WhatIf
顯示 Cmdlet 執行時會發生什麼事。 Cmdlet 未執行。
類型: | SwitchParameter |
別名: | wi |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |