Unregister-AzRecoveryServicesBackupContainer

Unregisters a Windows Server or other container from the vault.

Syntax

Unregister-AzRecoveryServicesBackupContainer
          [-Container] <ContainerBase>
          [-PassThru]
          [-VaultId <String>]
          [-DefaultProfile <IAzureContextContainer>]
          [-WhatIf]
          [-Confirm]
          [<CommonParameters>]

Description

The Unregister-AzRecoveryServicesBackupContainer cmdlet unregisters a Windows Server or other Backup container from the vault. This cmdlet removes references to a container from the vault. Before you can unregister a container, you must delete any protected data associated with that container. Set the vault context by using the Set-AzRecoveryServicesVaultContext cmdlet before you use the current cmdlet.

Examples

Example 1: Unregister a Windows Server from the vault

PS C:\>$Cont = Get-AzRecoveryServicesBackupContainer -ContainerType "Windows" -BackupManagementType MARS -Name "server01.contoso.com"
PS C:\> Unregister-AzRecoveryServicesBackupContainer -Container $Cont

The first command gets the Windows container named server01.contoso.com that is registered in the vault, and then stores it in the $Cont variable. The second command unregisters the specified Windows Server from the Azure Backup vault.

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
-Container

Specifies a Backup container object to unregister. To obtain a BackupContainer object, use the Get-AzRecoveryServicesBackupContainer cmdlet.

Type:Microsoft.Azure.Commands.RecoveryServices.Backup.Cmdlets.Models.ContainerBase
Position:1
Default value:None
Accept pipeline input:True (ByValue)
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
-PassThru

Return the container to be deleted.

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

Inputs

String

Outputs

Microsoft.Azure.Commands.RecoveryServices.Backup.Cmdlets.Models.ContainerBase