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.
Note
This is the previous version of our documentation. Please consult the most recent version for up-to-date information.
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 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 -Status Registered -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 where the item resides
| Type: | ContainerBase |
| Position: | 0 |
| Default value: | None |
| Accept pipeline input: | True |
| Accept wildcard characters: | False |
The credentials, account, tenant, and subscription used for communication with Azure.
| Type: | IAzureContextContainer |
| Aliases: | AzContext, AzureRmContext, AzureCredential |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Specifies the type of protectable item. Applicable values: (SQLDataBase, SQLInstance, SQLAvailabilityGroup).
| Type: | ProtectableItemType |
| Accepted values: | SQLDataBase, SQLInstance, SQLAvailabilityGroup |
| Position: | 2 |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Specifies the name of the Database, Instance or AvailabilityGroup.
| Type: | String |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Specified the ARM ID of an Instance or AG.
| Type: | String |
| Position: | 0 |
| Default value: | None |
| Accept pipeline input: | True |
| Accept wildcard characters: | False |
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 |
ARM ID of the Recovery Services Vault.
| Type: | String |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | True |
| Accept wildcard characters: | False |
Workload type of the resource. The current supported values are AzureVM, WindowsServer, AzureFiles, MSSQL
| Type: | WorkloadType |
| Accepted values: | AzureVM, WindowsServer, AzureFiles, MSSQL |
| Position: | 1 |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Inputs
System.String