Edit

Share via


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

NoFilterParamSet (Default)

Get-AzRecoveryServicesBackupProtectableItem
    [[-Container] <ContainerBase>]
    [-WorkloadType] <WorkloadType>
    [-VaultId <String>]
    [-DefaultProfile <IAzureContextContainer>]
    [<CommonParameters>]

FilterParamSet

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

IdParamSet

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

Description

The Get-AzRecoveryServicesBackupProtectableItem cmdlet gets the list of protectable items in a container 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

$Vault = Get-AzRecoveryServicesVault -Name "MyRecoveryVault"
$Container = Get-AzRecoveryServicesBackupContainer -ContainerType AzureVMAppContainer -VaultId $Vault.Id
$Item = Get-AzRecoveryServicesBackupProtectableItem -Container $Container -ItemType "SQLInstance" -WorkloadType "MSSQL" -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 protectable item in $Container, and then stores it in the $Item variable.

Parameters

-Container

Container where the item resides

Parameter properties

Type:ContainerBase
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

NoFilterParamSet
Position:0
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False
FilterParamSet
Position:0
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with Azure.

Parameter properties

Type:IAzureContextContainer
Default value:None
Supports wildcards:False
DontShow:False
Aliases:AzContext, AzureRmContext, AzureCredential

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ItemType

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

Parameter properties

Type:ProtectableItemType
Default value:None
Accepted values:SQLDataBase, SQLInstance, SQLAvailabilityGroup
Supports wildcards:False
DontShow:False

Parameter sets

FilterParamSet
Position:2
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
IdParamSet
Position:2
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Name

Specifies the name of the Database, Instance or AvailabilityGroup.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

FilterParamSet
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
IdParamSet
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ParentID

Specified the ARM ID of an Instance or AG.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

IdParamSet
Position:0
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-ServerName

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

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

FilterParamSet
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
IdParamSet
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-VaultId

ARM ID of the Recovery Services Vault.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-WorkloadType

Workload type of the resource. The current supported values are AzureVM, WindowsServer, AzureFiles, MSSQL

Parameter properties

Type:WorkloadType
Default value:None
Accepted values:AzureVM, WindowsServer, AzureFiles, MSSQL
Supports wildcards:False
DontShow:False

Parameter sets

NoFilterParamSet
Position:1
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
FilterParamSet
Position:1
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

ContainerBase

System.String

Outputs

ProtectableItemBase