Register-AzureRmBackupContainer
Registers the container with a Backup vault.
Warning
The AzureRM PowerShell module has been officially deprecated as of February 29, 2024. Users are advised to migrate from AzureRM to the Az PowerShell module to ensure continued support and updates.
Although the AzureRM module may still function, it's no longer maintained or supported, placing any continued use at the user's discretion and risk. Please refer to our migration resources for guidance on transitioning to the Az module.
Syntax
Register-AzureRmBackupContainer
-Name <String>
-ServiceName <String>
[-Vault] <AzureRMBackupVault>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Register-AzureRmBackupContainer
-Name <String>
-ResourceGroupName <String>
[-Vault] <AzureRMBackupVault>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
The Register-AzureRmBackupContainer cmdlet registers the container with an Azure Backup vault. To configure backup by using Azure Backup, first register your server or virtual machine with a Backup vault. This cmdlet registers an infrastructure as a service (IaaS) virtual machine with the specified vault. The register operation associates the Azure virtual machine with the backup vault and tracks the virtual machine through the backup life cycle.
Examples
Example 1: Register a virtual machine to a Backup vault
PS C:\>$Vault = Get-AzureRmBackupVault -Name "Vault03"
PS C:\> Register-AzureRmBackupContainer -Vault $Vault -Name "Contoso03Vm" -ServiceName "ContosoService27"
The first command gets the vault named Vault03 by using the Get-AzureRmBackupVault cmdlet. The command stores the vault in the $Vault variable. The second command registers the virtual machine named Contoso03Vm with the vault in $Vault. That virtual machine belongs to the service named ContosoService27.
Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure
Type: | IAzureContextContainer |
Aliases: | AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Name
Specifies the name of the virtual machine that this cmdlet registers.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-ResourceGroupName
Specifies the name of the resource group for the virtual machine.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-ServiceName
Specifies the service name of the virtual machine that this cmdlet registers. Typically, a cloud service name has a suffix .cloudapp.net. Do not include the suffix when you specify this parameter. To obtain information about a virtual machine, use the Get-AzureRMVM cmdlet. The service name is the DeploymentName property of the virtual machine object.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Vault
Specifies the Backup vault to which this cmdlet registers virtual machine. To obtain an AzureRmBackupVault object, use the Get-AzureRmBackupVault cmdlet.
Type: | AzureRMBackupVault |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Inputs
Parameters: Vault (ByValue)