Disable-AzRecoveryServicesBackupAutoProtection

Disables auto backup for a protectable item.

Syntax

Disable-AzRecoveryServicesBackupAutoProtection
       [-InputItem] <ProtectableItemBase>
       [-BackupManagementType] <BackupManagementType>
       [-WorkloadType] <WorkloadType>
       [-PassThru]
       [-VaultId <String>]
       [-DefaultProfile <IAzureContextContainer>]
       [-WhatIf]
       [-Confirm]
       [<CommonParameters>]

Description

The Disable-AzRecoveryServicesBackupAutoProtection cmdlet disables protection on a protectable item.

Examples

Example 1

PS C:\> $container = Get-AzRecoveryServicesBackupContainer -ContainerType AzureVMAppContainer
PS C:\> Get-AzRecoveryServicesBackupProtectableItem -Container $container -WorkloadType "MSSQL" -ItemType "SQLInstance" | Disable-AzRecoveryServicesBackupAutoProtection -BackupManagementType "AzureWorkload" -WorkloadType "MSSQL"

The first cmdlet disables the Backup protection policy.

Example 2

Disables auto backup for a protectable item. (autogenerated)

<!-- Aladdin Generated Example --> 
Disable-AzRecoveryServicesBackupAutoProtection -BackupManagementType AzureVM -InputItem <ProtectableItemBase> -VaultId $vault.ID -WorkloadType AzureVM

Parameters

-BackupManagementType

Backup Management type of the resource (for example: MAB, DPM).

Type:Microsoft.Azure.Commands.RecoveryServices.Backup.Cmdlets.Models.BackupManagementType
Accepted values:AzureVM, MARS, SCDPM, AzureBackupServer, AzureSQL, AzureStorage, AzureWorkload
Position:1
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-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:Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Aliases:AzContext, AzureRmContext, AzureCredential
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-InputItem

Item Id

Type:Microsoft.Azure.Commands.RecoveryServices.Backup.Cmdlets.Models.ProtectableItemBase
Position:0
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False
-PassThru

Return the result for auto protection.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-VaultId

ARM ID of the Recovery Services Vault.

Type:String
Position:Named
Default value:None
Accept pipeline input:True (ByValue)
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
-WorkloadType

Workload type of the resource (for example: AzureVM, WindowsServer, AzureFiles).

Type:Microsoft.Azure.Commands.RecoveryServices.Backup.Cmdlets.Models.WorkloadType
Accepted values:AzureVM, AzureSQLDatabase, AzureFiles, MSSQL
Position:2
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

Inputs

String

Outputs

Boolean