Get-AzRecoveryServicesBackupProtectableItem

This command will retrieve all protectable items within a certain container or across all registered containers. It will consist of all the elements of the hierarchy of the application. Returns DBs and their upper tier entities like Instance, AvailabilityGroup etc.

Syntax

Get-AzRecoveryServicesBackupProtectableItem
   [[-Container] <ContainerBase>]
   [-WorkloadType] <WorkloadType>
   [-VaultId <String>]
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]
Get-AzRecoveryServicesBackupProtectableItem
   [[-Container] <ContainerBase>]
   [-WorkloadType] <WorkloadType>
   [[-ItemType] <ProtectableItemType>]
   [-Name <String>]
   [-ServerName <String>]
   [-VaultId <String>]
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]
Get-AzRecoveryServicesBackupProtectableItem
   [-ParentID] <String>
   [[-ItemType] <ProtectableItemType>]
   [-Name <String>]
   [-ServerName <String>]
   [-VaultId <String>]
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]

Description

The Get-AzRecoveryServicesBackupProtectableItem cmdlet gets the protectable items in a container or a value in Azure Backup and the protection status of the items. A container that is registered to an Azure Recovery Services vault can have one or more items that can be protected.

Examples

Example 1

PS C:\>$Container = Get-AzRecoveryServicesBackupContainer -ContainerType MSSQL -Status Registered
PS C:\> $Item = Get-AzRecoveryServicesProtectableItem -Container $Container -ItemType "SQLDatabase" -VaultId $vault.ID

The first command gets the container of type MSSQL, and then stores it in the $Container variable. The second command gets the Backup item in $Container, and then stores it in the $Item variable.

Parameters

-Container

Container where the item resides

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

Specifies the type of protectable item. Applicable values: (SQLDataBase, SQLInstance, SQLAvailabilityGroup).

Type:Microsoft.Azure.Commands.RecoveryServices.Backup.Cmdlets.Models.ProtectableItemType
Accepted values:SQLDataBase, SQLInstance, SQLAvailabilityGroup
Position:2
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Name

Specifies the name of the Database, Instance or AvailabilityGroup.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ParentID

Specified the ARM ID of an Instance or AG.

Type:String
Position:0
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-ServerName

Specifies the name of the server to which the item belongs.

Type:String
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
-WorkloadType

Workload type of the resource (for example: AzureVM, WindowsServer, AzureFiles, MSSQL).

Type:Microsoft.Azure.Commands.RecoveryServices.Backup.Cmdlets.Models.WorkloadType
Accepted values:AzureVM, AzureSQLDatabase, AzureFiles, MSSQL
Position:1
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

Inputs

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

System.String

Outputs

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

Notes