< Back

Get-AzureRmRedisCacheLink

Tue Jan 29, 2019 10:04 pm

NAME Get-AzureRmRedisCacheLink



SYNOPSIS

Get geo replication link for Redis Cache.





SYNTAX

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



Get-AzureRmRedisCacheLink [-DefaultProfile <IAzureContextContainer>] -PrimaryServerName <String> [<CommonParameters>]



Get-AzureRmRedisCacheLink [-DefaultProfile <IAzureContextContainer>] -PrimaryServerName <String> -SecondaryServerName <String> [<CommonParameters>]



Get-AzureRmRedisCacheLink [-DefaultProfile <IAzureContextContainer>] -SecondaryServerName <String> [<CommonParameters>]





DESCRIPTION

There are four different ways to get geo-replication link detail. Either provide parameter Name or PrimaryServerName and/or SecondaryServerName.

Name is given then all link where cache exists will be returned. If only PrimaryServerName is given then all links where cache is primary will be

returned. If only SecondaryServerName is given then all links where cache is secondary will be returned. If PrimaryServerName and

SecondaryServerName both are given then specific link with correct role will be returned.





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



-Name <String>

Name of redis cache.



Required? true

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-PrimaryServerName <String>

Name of primary redis cache in link.



Required? true

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-SecondaryServerName <String>

Name of secondary redis cache in link.



Required? true

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

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

System.String

You can pipe input to this cmdlet by name, but not by value.





OUTPUTS

System.Collections.Generic.List`1[[Microsoft.Azure.Commands.RedisCache.Models.PSRedisLinkedServer, Microsoft.Azure.Commands.RedisCache,

Version=4.0.1.0, Culture=neutral, PublicKeyToken=null]]







NOTES









Example 1: Get using parameter set AllLinksForCache



PS C:\\>Get-AzureRmRedisCacheLink -Name "mycache1"



PrimaryServerName : mycache1

SecondaryServerName : mycache2

ProvisioningState : Succeeded



This command gets all geo-replication links for Redis Cache named mycache1.





Example 2: Get using parameter set AllLinksForPrimaryCache



PS C:\\>Get-AzureRmRedisCacheLink -PrimaryServerName "mycache1"



PrimaryServerName : mycache1

SecondaryServerName : mycache2

ProvisioningState : Succeeded



This command gets geo-replication links where Redis Cache named mycache1 is primary.





Example 3: Get using parameter set AllLinksForSecondaryCache



PS C:\\>Get-AzureRmRedisCacheLink -SecondaryServerName "mycache2"



PrimaryServerName : mycache1

SecondaryServerName : mycache2

ProvisioningState : Succeeded



This command gets geo-replication links where Redis Cache named mycache2 is secondary.





Example 4: Get using parameter set SingleLink



PS C:\\>Get-AzureRmRedisCacheLink -PrimaryServerName "mycache1" -SecondaryServerName "mycache2"



PrimaryServerName : mycache1

SecondaryServerName : mycache2

ProvisioningState : Succeeded



This command gets a single geo-replication links where Redis Cache named mycache1 is primary and Redis Cache named mycache2 is secondary.







RELATED LINKS

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

New-AzureRmRedisCacheLink

Remove-AzureRmRedisCacheLink

Get-AzureRmRedisCache

New-AzureRmRedisCache

Remove-AzureRmRedisCache

Reset-AzureRmRedisCache