< Back

Unregister-AzureRmBackupContainer

Tue Jan 29, 2019 9:34 pm

NAME Unregister-AzureRmBackupContainer



SYNOPSIS

Unregisters a container from a Backup vault.





SYNTAX

Unregister-AzureRmBackupContainer [-Container] <AzureRMBackupContainer> [[-Force]] [-DefaultProfile <IAzureContextContainer>] [-Confirm] [-WhatIf]

[<CommonParameters>]





DESCRIPTION

The Unregister-AzureRmBackupContainer cmdlet unregisters the Windows Server or Azure virtual machine from an Azure Backup vault. This cmdlet

removes references to a container from the Backup vault. Before you can unregister a container, you must delete any protected data associated with

that container.





PARAMETERS

-Container <AzureRMBackupContainer>

Specifies the Windows Server or Azure virtual machine that this cmdlet unregisters. To obtain an AzureRmBackupContainer , use the

Get-AzureRmBackupContainer cmdlet.



Required? true

Position? 0

Default value None

Accept pipeline input? True (ByValue)

Accept wildcard characters? false



-DefaultProfile <IAzureContextContainer>

The credentials, account, tenant, and subscription used for communication with azure



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Force [<SwitchParameter>]

Forces the command to run without asking for user confirmation. This parameter is relevant only for AzureBackupContainer objects of type

Windows.



Required? false

Position? 1

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-Confirm [<SwitchParameter>]

Prompts you for confirmation before running the cmdlet.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-WhatIf [<SwitchParameter>]

Shows what would happen if the cmdlet runs. The cmdlet is not run.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).



INPUTS

AzureBackupContainer







OUTPUTS

AzureBackupJob

This cmdlet returns $Null if the container type is Windows Server.





NOTES





* None



Example 1: Unregister a Windows Server



PS C:\\>$Vault = Get-AzureRmBackupVault -Name "Vault03"

PS C:\\> $Container = Get-AzureRmBackupContainer -Vault $Vault -Type Windows -Name "server01.contoso.com"

PS C:\\> Unregister-AzureRmBackupContainer -Container $Container[0]

Unregister Server

This operation will delete all data in the backup vault that is associated with the server. Are you sure you want to unregister the server?

[] Yes [] No [?] Help (default is "No"): Yes



The first command gets the vault named Vault03 by using the Get-AzureRmBackupVault cmdlet. The command stores that object in the $Vault variable.



The second command gets a container that has the specified name in the vault in $Vault by using the Get-AzureRmBackupContainer cmdlet. The command

stores that object in the $Container variable.



The final command unregisters the specified Windows Server from the Azure Backup vault.





Example 2: Unregister a Windows Server without confirmation



PS C:\\>Unregister-AzureRmBackupContainer -Container $Container[0] -Force



This command unregisters the specified Windows Server from the Azure Backup vault, just as in the first example. This command specifies the Force

parameter. Therefore, the command does not prompt you for confirmation.







RELATED LINKS

Online Version: https://docs.microsoft.com/en-us/powers ... pcontainer

Get-AzureRmBackupContainer

Get-AzureRmBackupVault

Register-AzureRmBackupContainer