Remove-AzDiagnosticSetting
Remove a diagnostic setting for the a resource.
Sintaxis
Default (Es el valor predeterminado).
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.
Ejemplos
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.
Parámetros
-Confirm
Prompts you for confirmation before running the cmdlet.
Propiedades del parámetro
Tipo: | SwitchParameter |
Valor predeterminado: | None |
Admite caracteres comodín: | False |
DontShow: | False |
Alias: | cf |
Conjuntos de parámetros
(All)
Posición: | Named |
Mandatory: | False |
Valor de la canalización: | False |
Valor de la canalización por nombre de propiedad: | False |
Valor de los argumentos restantes: | False |
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Propiedades del parámetro
Tipo: | IAzureContextContainer |
Valor predeterminado: | None |
Admite caracteres comodín: | False |
DontShow: | False |
Alias: | AzContext, AzureRmContext, AzureCredential |
Conjuntos de parámetros
(All)
Posición: | Named |
Mandatory: | False |
Valor de la canalización: | False |
Valor de la canalización por nombre de propiedad: | False |
Valor de los argumentos restantes: | 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.
Propiedades del parámetro
Tipo: | String |
Valor predeterminado: | None |
Admite caracteres comodín: | False |
DontShow: | False |
Conjuntos de parámetros
(All)
Posición: | Named |
Mandatory: | False |
Valor de la canalización: | False |
Valor de la canalización por nombre de propiedad: | True |
Valor de los argumentos restantes: | False |
-ResourceId
Specifies the ID of the resource.
Propiedades del parámetro
Tipo: | String |
Valor predeterminado: | None |
Admite caracteres comodín: | False |
DontShow: | False |
Conjuntos de parámetros
(All)
Posición: | Named |
Mandatory: | True |
Valor de la canalización: | False |
Valor de la canalización por nombre de propiedad: | True |
Valor de los argumentos restantes: | False |
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Propiedades del parámetro
Tipo: | SwitchParameter |
Valor predeterminado: | None |
Admite caracteres comodín: | False |
DontShow: | False |
Alias: | wi |
Conjuntos de parámetros
(All)
Posición: | Named |
Mandatory: | False |
Valor de la canalización: | False |
Valor de la canalización por nombre de propiedad: | False |
Valor de los argumentos restantes: | 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.