Azure Documentation

Azure Cache for Redis Cmdlets

This section provides a comprehensive reference for the Azure PowerShell cmdlets used to manage Azure Cache for Redis instances.

Core Cmdlets

New-AzRedisCache

Creates a new Azure Cache for Redis instance.

Get-AzRedisCache

Retrieves one or more Azure Cache for Redis instances.

Remove-AzRedisCache

Deletes an Azure Cache for Redis instance.

Set-AzRedisCache

Updates properties of an existing Azure Cache for Redis instance.

New-AzRedisCacheLink

Creates a replication link between two Azure Cache for Redis instances.

Get-AzRedisCacheLink

Retrieves replication links for an Azure Cache for Redis instance.

Remove-AzRedisCacheLink

Removes a replication link between Azure Cache for Redis instances.

Firewall Rules Cmdlets

New-AzRedisCacheFirewallRule

Creates a firewall rule for an Azure Cache for Redis instance.

Get-AzRedisCacheFirewallRule

Retrieves one or more firewall rules for an Azure Cache for Redis instance.

Remove-AzRedisCacheFirewallRule

Deletes a firewall rule from an Azure Cache for Redis instance.

Access Keys Cmdlets

Get-AzRedisCacheKey

Retrieves the access keys for an Azure Cache for Redis instance.

New-AzRedisCacheKey

Regenerates the access keys for an Azure Cache for Redis instance.

Common Scenarios

Here are some common use cases for Azure Cache for Redis cmdlets:

# Create a basic Azure Cache for Redis instance
New-AzRedisCache -Name "my-redis-cache" -ResourceGroupName "my-resource-group" -Location "East US" -Sku C1 -RedisVersion 6

# Get details of a specific Redis Cache
Get-AzRedisCache -Name "my-redis-cache" -ResourceGroupName "my-resource-group"

# List all Redis Caches in a resource group
Get-AzRedisCache -ResourceGroupName "my-resource-group"

# Add a firewall rule to allow access from a specific IP address
New-AzRedisCacheFirewallRule -CacheName "my-redis-cache" -ResourceGroupName "my-resource-group" -Name "AllowSpecificIP" -StartIPAddress "203.0.113.1" -EndIPAddress "203.0.113.1"

# Regenerate primary access key
New-AzRedisCacheKey -CacheName "my-redis-cache" -ResourceGroupName "my-resource-group" -KeyType Primary

Related Concepts