您现在访问的是微软AZURE全睃版技术文档网站,若需覝访问由世纪互蝔违蝥的MICROSOFT AZURE中国区技术文档网站,请访问 https://docs.azure.cn.

Set-AzSecurityPricing

Enables or disables Azure Defender plans for a subscription in Azure Security Center.

Syntax

Set-AzSecurityPricing
   -Name <String>
   -PricingTier <String>
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Set-AzSecurityPricing
   -InputObject <PSSecurityPricing>
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

Enable or disable any of the Azure Defender plans for a subscription.

For details about Azure Defender and the available plans, see Introduction to Azure Defender.

Examples

Example 1

PS C:\> Set-AzSecurityPricing -Name "virtualmachines" -PricingTier "Standard"

Enables Azure Defender for servers for the subscription.

"Standard" refers to the "On" state for an Azure Defender plan as shown in Azure Security Center's pricing and settings area of the Azure portal.

Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-DefaultProfile

The credentials, account, tenant, and subscription used for communication with Azure.

Type:IAzureContextContainer
Aliases:AzContext, AzureRmContext, AzureCredential
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-InputObject

Input Object.

Type:PSSecurityPricing
Position:Named
Default value:None
Accept pipeline input:True
Accept wildcard characters:False
-Name

Resource name.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-PricingTier

Pricing Tier.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

Inputs

PSSecurityPricing

Outputs

PSSecurityPricing