New-​Azure​Rm​Redis​Cache​Key

Regenerates the access key of a Redis Cache.

Syntax

New-AzureRmRedisCacheKey
   -Name <String>
   -ResourceGroupName <String>
   -KeyType <String>
   [-Force]
   [-Confirm]
   [-WhatIf]
   [<CommonParameters>]

Description

The New-AzureRmRedisCacheKey cmdlet regenerates the access key of an Azure Redis Cache.

Examples

Example 1: Regenerate a primary key

PS C:\>New-AzureRmRedisCacheKey -ResourceGroupName "ResourceGroup03" -Name "myCache" -KeyType "Primary" -Force

          PrimaryKey        : pJ+jruGKPHDKsEC8kmoybobH3TZx2njBR3ipEsquZFo=

          SecondaryKey      : sJ+jruGKPHDKsEC8kmoybobH3TZx2njBR3ipEsquZFo=

This command regenerates the primary key of a Redis Cache.

Example 2: Regenerate a secondary key

PS C:\>New-AzureRmRedisCacheKey -ResourceGroupName "ResourceGroup03" -Name "myCache" -KeyType "Secondary" -Force
          PrimaryKey        : pJ+jruGKPHDKsEC8kmoybobH3TZx2njBR3ipEsquZFo=

          SecondaryKey      : sJ+jruGKPHDKsEC8kmoybobH3TZx2njBR3ipEsquZFo=

This command regenerates the secondary key of a Redis Cache.

Required Parameters

-KeyType

Specifies whether to regenerate the primary or secondary access key. Valid values are: Primary, Secondary.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Name

Specifies the name of the Redis Cache.

Type:String
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-ResourceGroupName

Specifies the name of the resource group that contains the Redis Cache.

Type:String
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False

Optional Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False
-Force

Forces the command to run without asking for user confirmation.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

None

Outputs

Microsoft.Azure.Management.Redis.Models.RedisAccessKeys