Sdílet prostřednictvím


Remove-AzDiagnosticSetting

Remove a diagnostic setting for the a resource.

Syntaxe

Default (Výchozí)

Remove-AzDiagnosticSetting
    -ResourceId <String>
    [-Name <String>]
    [-DefaultProfile <IAzureContextContainer>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Description

The Remove-AzDiagnosticSetting cmdlet removes the diagnostic setting for the particular resource. This cmdlet implements the ShouldProcess pattern, i.e. it might request confirmation from the user before actually creating, modifying, or removing the resource.

Příklady

Example 1: Remove the default diagnostic setting (service) for a resource

PS C:\>Remove-AzDiagnosticSetting -ResourceId "Resource01"

This command removes the default diagnostic setting (service) for the resource called Resource01.

Example 2: Remove the default diagnostic setting identified by the given name for a resource

PS C:\>Remove-AzDiagnosticSetting -ResourceId "Resource01" -Name myDiagSetting

This command removes the diagnostic setting called myDiagSetting for the resource called Resource01.

Parametry

-Confirm

Prompts you for confirmation before running the cmdlet.

Vlastnosti parametru

Typ:SwitchParameter
Default value:None
Podporuje zástupné znaky:False
DontShow:False
Aliasy:cf

Sady parametrů

(All)
Position:Named
Povinné:False
Hodnota z kanálu:False
Hodnota z kanálu podle názvu vlastnosti:False
Hodnota ze zbývajících argumentů:False

-DefaultProfile

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

Vlastnosti parametru

Typ:IAzureContextContainer
Default value:None
Podporuje zástupné znaky:False
DontShow:False
Aliasy:AzContext, AzureRmContext, AzureCredential

Sady parametrů

(All)
Position:Named
Povinné:False
Hodnota z kanálu:False
Hodnota z kanálu podle názvu vlastnosti:False
Hodnota ze zbývajících argumentů:False

-Name

The name of the diagnostic setting. If not given the call default to "service" as it was in the previous API and this cmdlet will only disable all categories for metrics/logs.

Vlastnosti parametru

Typ:String
Default value:None
Podporuje zástupné znaky:False
DontShow:False

Sady parametrů

(All)
Position:Named
Povinné:False
Hodnota z kanálu:False
Hodnota z kanálu podle názvu vlastnosti:True
Hodnota ze zbývajících argumentů:False

-ResourceId

Specifies the ID of the resource.

Vlastnosti parametru

Typ:String
Default value:None
Podporuje zástupné znaky:False
DontShow:False

Sady parametrů

(All)
Position:Named
Povinné:True
Hodnota z kanálu:False
Hodnota z kanálu podle názvu vlastnosti:True
Hodnota ze zbývajících argumentů:False

-WhatIf

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

Vlastnosti parametru

Typ:SwitchParameter
Default value:None
Podporuje zástupné znaky:False
DontShow:False
Aliasy:wi

Sady parametrů

(All)
Position:Named
Povinné:False
Hodnota z kanálu:False
Hodnota z kanálu podle názvu vlastnosti:False
Hodnota ze zbývajících argumentů:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Vstupy

String

Výstupy

Microsoft.Azure.AzureOperationResponse