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
$vault = Get-AzRecoveryServicesVault -ResourceGroupName "resourceGroup" -Name "vaultName"
$container = Get-AzRecoveryServicesBackupContainer -ContainerType AzureVMAppContainer -Status "Registered" -FriendlyName "TestSQLServerVM" -VaultId $vault.ID
Get-AzRecoveryServicesBackupProtectableItem -Container $container -WorkloadType "MSSQL" -ItemType "SQLInstance" -Name "MSSQLInstance" | Disable-AzRecoveryServicesBackupAutoProtection -BackupManagementType "AzureWorkload" -WorkloadType "MSSQL"
The first cmdlet gets the Backup container of type AzureVMAppContainer. The second cmdlet gets the protectable BackupItem and disables auto protection.
Example 2
Disables auto backup for a protectable item. (autogenerated)
Disable-AzRecoveryServicesBackupAutoProtection -BackupManagementType AzureVM -InputItem <ProtectableItemBase> -VaultId $vault.ID -WorkloadType AzureVM
Parameters
-BackupManagementType
The class of resources being protected. Currently the value supported for this cmdlet is AzureWorkload
Type: | BackupManagementType |
Accepted values: | AzureWorkload |
Position: | 1 |
Default value: | None |
Required: | True |
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 |
Required: | False |
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 |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-InputItem
Item Id
Type: | ProtectableItemBase |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-PassThru
Return the result for auto protection.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-VaultId
ARM ID of the Recovery Services Vault.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
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 |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-WorkloadType
Workload type of the resource. The current supported value is "MSSQL"
Type: | WorkloadType |
Accepted values: | MSSQL |
Position: | 2 |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Inputs
Outputs
Azure PowerShell