< Back

Get-AzureRmRecoveryServicesAsrPolicy

Tue Jan 29, 2019 10:01 pm

NAME Get-AzureRmRecoveryServicesAsrPolicy



SYNOPSIS

Gets ASR replication policies.





SYNTAX

Get-AzureRmRecoveryServicesAsrPolicy [-DefaultProfile <IAzureContextContainer>] -FriendlyName <String> [<CommonParameters>]



Get-AzureRmRecoveryServicesAsrPolicy [-DefaultProfile <IAzureContextContainer>] -Name <String> [<CommonParameters>]





DESCRIPTION

The Get-AzureRmRecoveryServicesAsrPolicy cmdlet gets the list of configured Azure Site Recovery replication policies or a specific replication

policy by name.





PARAMETERS

-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



-FriendlyName <String>

Specifies the friendly name of the ASR replication policy.



Required? true

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Name <String>

Specifies the name of the ASR replication policy.



Required? true

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

None







OUTPUTS

System.Collections.Generic.IEnumerable`1[[Microsoft.Azure.Commands.RecoveryServices.SiteRecovery.ASRPolicy,

Microsoft.Azure.Commands.RecoveryServices.SiteRecovery, Version=4.0.0.0, Culture=neutral, PublicKeyToken=null]]







NOTES









Example 1



PS C:\\> $Policy = Get-AzureRmRecoveryServicesAsrPolicy



Retuns the list of replication policies





Example 2



PS C:\\> Get-AzureRmRecoveryServicesAsrPolicy -Name abc



FriendlyName : abc

Name : abc

ID :

/Subscriptions/xxxxxxxxxxxx/resourceGroups/xxxxxxxxxxxx/providers/Microsoft.RecoveryServices/vaults/xxxxxxxxxxxx/replicationPolicies/abc

Type : Microsoft.RecoveryServices/vaults/replicationPolicies

ReplicationProvider : HyperVReplicaAzure

ReplicationProviderSettings : Microsoft.Azure.Commands.RecoveryServices.SiteRecovery.ASRHyperVReplicaAzurePolicyDetails



Retuns replication policy with name.





Example 3



PS C:\\> Get-AzureRmRecoveryServicesAsrPolicy -FriendlyName abc



FriendlyName : abc

Name : abc

ID :

/Subscriptions/xxxxxxxxxxxx/resourceGroups/xxxxxxxxxxxx/providers/Microsoft.RecoveryServices/vaults/xxxxxxxxxxxx/replicationPolicies/abc

Type : Microsoft.RecoveryServices/vaults/replicationPolicies

ReplicationProvider : HyperVReplicaAzure

ReplicationProviderSettings : Microsoft.Azure.Commands.RecoveryServices.SiteRecovery.ASRHyperVReplicaAzurePolicyDetails



Returns the replication policy with the specified friendly name.







RELATED LINKS

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

New-AzureRmRecoveryServicesAsrPolicy

Remove-AzureRmRecoveryServicesAsrPolicy