New-​Azure​Rm​Relay​Key

Regenerates the primary or secondary connection strings for the given Relay entities (Namespace/WcfRelay/HybridConnection)

Syntax

New-AzureRmRelayKey
   [-ResourceGroupName] <String>
   [[-Namespace] <String>]
   [-HybridConnection] <String>
   [-Name] <String>
   [-Confirm]
   -RegenerateKey <String>
   [-WhatIf]
New-AzureRmRelayKey
   [-ResourceGroupName] <String>
   [-Namespace] <String>
   [-Name] <String>
   [-Confirm]
   -RegenerateKey <String>
   [-WhatIf]
New-AzureRmRelayKey
   [-ResourceGroupName] <String>
   [[-Namespace] <String>]
   [-WcfRelay] <String>
   [-Name] <String>
   [-Confirm]
   -RegenerateKey <String>
   [-WhatIf]

Description

The New-AzureRmRelayKey cmdlet generates the primary and secondary connection strings for the given Relay entities (Namespace/WcfRelay/HybridConnection).

Examples

Example 1 - Namespace

PS C:\> New-AzureRmRelayKey -ResourceGroupName Default-ServiceBus-WestUS -Namespace TestNameSpace-Relay1 -Name AuthoRule1 -RegenerateKeys PrimaryKey

PS C:\> New-AzureRmRelayKey -ResourceGroupName Default-ServiceBus-WestUS -Namespace TestNameSpace-Relay1 -Name AuthoRule1 -RegenerateKeys SecondaryKey

Example 2 - WcfRelay

PS C:\> New-AzureRmRelayKey -ResourceGroupName Default-ServiceBus-WestUS -Namespace TestNameSpace-Relay1 -Name AuthoRule1 -WcfRelay TestWCFRelay1 -RegenerateKeys PrimaryKey

PS C:\> New-AzureRmRelayKey -ResourceGroupName Default-ServiceBus-WestUS -Namespace TestNameSpace-Relay1 -Name AuthoRule1 -WcfRelay TestWCFRelay1 -RegenerateKeys SecondaryKey

Example 3 - HybridConnection

PS C:\> New-AzureRmRelayKey -ResourceGroupName Default-ServiceBus-WestUS -Namespace TestNameSpace-Relay1 -Name AuthoRule1 -HybridConnection TestHybridConnection -RegenerateKeys PrimaryKey

PS C:\> New-AzureRmRelayKey -ResourceGroupName Default-ServiceBus-WestUS -Namespace TestNameSpace-Relay1 -Name AuthoRule1 -HybridConnection TestHybridConnection -RegenerateKeys SecondaryKey

Regenerates the primary or secondary connection strings for the given Relay entities (Namespace/WcfRelay/HybridConnection).

Required Parameters

-HybridConnection

HybridConnection Name.

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

AuthorizationRule Name.

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

Namespace Name.

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

Regenerate Keys - 'PrimaryKey'/'SecondaryKey'.

Type:String
Parameter Sets:PrimaryKey, SecondaryKey
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ResourceGroupName

Resource Group Name.

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

WcfRelay Name.

Type:String
Position:2
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: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:None
Accept pipeline input:False
Accept wildcard characters:False

Inputs

-ResourceGroupNameName

System.String

Inputs

-NamespaceName

System.String

Inputs

-HybridConnectionsName

System.String

Inputs

-WcfRelayName

System.String

Inputs

-Name

System.String

Inputs

-RegenerateKeys

System.String

Outputs

Microsoft.Azure.Commands.Relay.Models.AuthorizationRuleKeysAttributes

Outputs

Example 1 - Namespace

PrimaryConnectionString : Endpoint=sb://testnamespace-relay1.servicebus.windows.net/;SharedAccessKeyName=AuthoRule1;SharedAccessKey=############################################ SecondaryConnectionString : Endpoint=sb://testnamespace-relay1.servicebus.windows.net/;SharedAccessKeyName=AuthoRule1;SharedAccessKey=############################################ PrimaryKey : ############################################ SecondaryKey : ############################################ KeyName : AuthoRule1

Outputs

Example 2 - WcfRelay

PrimaryConnectionString : Endpoint=sb://testnamespace-relay1.servicebus.windows.net/;SharedAccessKeyName=AuthoRule1;SharedAccessKey=############################################;EntityPath=TestWCFRelay1 SecondaryConnectionString : Endpoint=sb://testnamespace-relay1.servicebus.windows.net/;SharedAccessKeyName=AuthoRule1;SharedAccessKey=############################################;EntityPath=TestWCFRelay1 PrimaryKey : ############################################ SecondaryKey : ############################################ KeyName : AuthoRule1

Outputs

Example 3 - HybridConnection

PrimaryConnectionString : Endpoint=sb://testnamespace-relay1.servicebus.windows.net/;SharedAccessKeyName=AuthoRule1;SharedAccessKey=############################################;EntityPath=TestHybridConnection SecondaryConnectionString : Endpoint=sb://testnamespace-relay1.servicebus.windows.net/;SharedAccessKeyName=AuthoRule1;SharedAccessKey=############################################;EntityPath=TestHybridConnection PrimaryKey : ############################################ SecondaryKey : ############################################ KeyName : AuthoRule1