Unregister-AzRecoveryServicesBackupContainer
Unregisters a Windows Server or other container from the vault.
Note
This is the previous version of our documentation. Please consult the most recent version for up-to-date information.
Syntax
Unregister-AzRecoveryServicesBackupContainer
[-Container] <ContainerBase>
[-PassThru]
[-Force]
[-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
$Cont = Get-AzRecoveryServicesBackupContainer -ContainerType "Windows" -BackupManagementType MAB -Name "server01.contoso.com"
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.
Example 2
Unregisters a Windows Server or other container from the vault. (autogenerated)
Unregister-AzRecoveryServicesBackupContainer -Container $Cont -VaultId $vault.ID
Parameters
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 |
Specifies a Backup container object to unregister. To obtain a BackupContainer object, use the Get-AzRecoveryServicesBackupContainer cmdlet.
| Type: | ContainerBase |
| Position: | 1 |
| Default value: | None |
| Accept pipeline input: | True |
| Accept wildcard characters: | False |
The credentials, account, tenant, and subscription used for communication with azure.
| Type: | IAzureContextContainer |
| Aliases: | AzContext, AzureRmContext, AzureCredential |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Force unregisters container (prevents confirmation dialog). This parameter is optional.
| Type: | SwitchParameter |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Return the container to be deleted.
| Type: | SwitchParameter |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
ARM ID of the Recovery Services Vault.
| Type: | String |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | True |
| Accept wildcard characters: | False |
Shows what would happen if the cmdlet runs.
| Type: | SwitchParameter |
| Aliases: | wi |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |