< Back

Get-AzureRmBackupItem

Tue Jan 29, 2019 9:34 pm

NAME Get-AzureRmBackupItem



SYNOPSIS

Gets the items under a container in Backup.





SYNTAX

Get-AzureRmBackupItem [-Container] <AzureRMBackupContainer> [-DefaultProfile <IAzureContextContainer>] [-ProtectionStatus {Protected | Protecting

| NotProtected}] [-Status {IRPending | ProtectionStopped | ProtectionError | Protected}] [-Type {AzureVM}] [<CommonParameters>]





DESCRIPTION

The Get-AzureRmBackupItem cmdlet gets the items in a container in Azure Backup and the protection status of the items. Enable items for protection

by using the Enable-AzureRmBackupProtection cmdlet.



A container that is registered to a Backup vault can have one or more items that can be protected. For Azure virtual machines, there can be only

one item in the virtual machine container.





PARAMETERS

-Container <AzureRMBackupContainer>

Specifies a container object for which this cmdlet gets backup items. 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



-ProtectionStatus <String>

Specifies the overall protection status of an item in the container. The acceptable values for this parameter are:



- Protected



- Protecting

- NotProtected



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Status <String>

Specifies the backup status for an item. The acceptable values for this parameter are: IRPending, Protected, ProtectionError, and

ProtectionStopped. If the ProtectionStatus parameter has the value Protected, you can use the Status parameter value to filter items.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Type <String>

Specifies the type of item that this cmdlet gets. Currently, the only supported value is AzureVM.



Required? false

Position? named

Default value None

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

AzureRmBackupContainer







OUTPUTS

AzureRmBackupItem







NOTES









Example 1: Get the items in a container



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

PS C:\\> $Container = Get-AzureRmBackupContainer -Vault $Vault -Type AzureVM -Name "DPMSERVER.CONTOSO.COM"

PS C:\\> Get-AzureRmBackupItem -Container $Container

Name ProtectionStatus DataSourceStatus RecoveryPointsCount ProtectionPolicyName

---- ---------------- ---------------- ------------------- --------------------

co03-vm NotProtected 0



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 gets the backup item in the container in $Container.





Example 2: View all properties for an item



PS C:\\>Get-AzureRmBackupItem -Container $Container | Select-Object -Property *

Name : co03-vm

DataSourceStatus :

ProtectionStatus : NotProtected

Type : AzureVM

ProtectionPolicyName :

ProtectionPolicyId :

RecoveryPointsCount : 0

ItemName : iaasvmcontainer;co03-vm;co03-vm

ContainerType : AzureVM

ContainerUniqueName : iaasvmcontainer;co03-vm;co03-vm

ResourceGroupName : resourcegroup02

ResourceName : vault03

Location : southeastasia



This command gets the backup item in the container in $Container, and then passes it to the Select-Object cmdlet. That cmdlet returns all

properties of the backup item. For more information, type `Get-Help Select-Object`.







RELATED LINKS

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

Backup-AzureRmBackupItem

Disable-AzureRmBackupProtection

Enable-AzureRmBackupProtection

Get-AzureRmBackupContainer

Get-AzureRmBackupVault

Restore-AzureRmBackupItem