Get-AzureRmRecoveryServicesAsrProtectableItem
Get the protectable items in an ASR protection container.
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
Get-AzureRmRecoveryServicesAsrProtectableItem
-ProtectionContainer <ASRProtectionContainer>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Get-AzureRmRecoveryServicesAsrProtectableItem
-Name <String>
-ProtectionContainer <ASRProtectionContainer>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Get-AzureRmRecoveryServicesAsrProtectableItem
-FriendlyName <String>
-ProtectionContainer <ASRProtectionContainer>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
The Get-AzureRmRecoveryServicesAsrProtectableItem cmdlet gets the protectable items in an Azure Site Recovery Protection Container.
Examples
Example 1
PS C:\> $ProtectableItems = Get-AzureRmRecoveryServicesAsrProtectableItem -ProtectionContainer $Container
Gets all the protectable items in specified ASR protection container.
Example 2
PS C:\> Get-ASRProtectableItem -ProtectionContainer $pc -FriendlyName $piFriendlyName
Disks : {}
FabricObjectId :
FabricSpecificVMDetails : Microsoft.Azure.Commands.RecoveryServices.SiteRecovery.ASRVMWareSpecificVMDetails
FriendlyName : V2A-W2K12-400
ID : /Subscriptions/xxxxxxxxxxxx/resourceGroups/canaryexproute/providers/Microsoft.RecoveryServices/vaults/IbizaV2ATest/replicationFabrics/d011a5abf48190235963ee3a88ad188ee6bca8a4c6cd0c8d7ce5d439aa77ffd9/replicationProt
ectionContainers/cloud_5dc96260-9f00-42e4-aca7-24ad27fc2078/replicationProtectableItems/22d47502-7df0-11e7-9373-0050568f2e8f
Name : 22d47502-7df0-11e7-9373-0050568f2e8f
OS : WINDOWS
OSDiskId :
OSDiskName :
ProtectionContainerId : cloud_5dc96260-9f00-42e4-aca7-24ad27fc2078
ProtectionReadinessErrors :
ProtectionStatus : Unprotected
ReplicationProtectedItemId :
SupportedReplicationProviders : {InMage, InMageAzureV2}
Get the protectable items in specified ASR protection container and with given friendly name.
Example 3
PS C:\> Get-ASRProtectableItem -ProtectionContainer $pc -Name $piName
Disks : {}
FabricObjectId :
FabricSpecificVMDetails : Microsoft.Azure.Commands.RecoveryServices.SiteRecovery.ASRVMWareSpecificVMDetails
FriendlyName : V2A-W2K12-400
ID : /Subscriptions/xxxxxxxxxxxx/resourceGroups/canaryexproute/providers/Microsoft.RecoveryServices/vaults/IbizaV2ATest/replicationFabrics/d011a5abf48190235963ee3a88ad188ee6bca8a4c6cd0c8d7ce5d439aa77ffd9/replicationProt
ectionContainers/cloud_5dc96260-9f00-42e4-aca7-24ad27fc2078/replicationProtectableItems/22d47502-7df0-11e7-9373-0050568f2e8f
Name : 22d47502-7df0-11e7-9373-0050568f2e8f
OS : WINDOWS
OSDiskId :
OSDiskName :
ProtectionContainerId : cloud_5dc96260-9f00-42e4-aca7-24ad27fc2078
ProtectionReadinessErrors :
ProtectionStatus : Unprotected
ReplicationProtectedItemId :
SupportedReplicationProviders : {InMage, InMageAzureV2}
Gets all the protectable items in specified ASR protection container.
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 |
-FriendlyName
Specifies the friendly name of the ASR protectable item.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Name
Specifies the name of the ASR protectable item.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ProtectionContainer
Specifies the Azure Site Recovery Protection Container object.
Type: | ASRProtectionContainer |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Inputs
Outputs
IEnumerable<T>[[Microsoft.Azure.Commands.RecoveryServices.SiteRecovery.ASRProtectableItem, Microsoft.Azure.Commands.RecoveryServices.SiteRecovery, Version=4.0.0.0, Culture=neutral, PublicKeyToken=null]]