Get-​Azure​Rm​Iot​Hub​Connection​String

Gets the IotHub connectionstrings.

Syntax

Get-AzureRmIotHubConnectionString
   [-ResourceGroupName] <String>
   [-Name] <String>
   [[-KeyName] <String>]
   [<CommonParameters>]

Description

Gets the IotHub connectionstrings. You can either get connectionstrings for all the keys or filter them by a specific key name.

Examples

Example 1 Get All IotHub connectionstrings

PS C:\> Get-AzureRmIotHubConnectionString -ResourceGroupName "myresourcegroup" -Name "myiothub"

Gets the connectionstrings for all keys for the iothub named "myiothub"

Example 2 Get the IotHub connectionstrings for a specific key

PS C:\> Get-AzureRmIotHubConnectionString -ResourceGroupName "myresourcegroup" -Name "myiothub" -KeyName "mykey"

Gets the connectionstrings for the key named "mykey" for the iothub named "myiothub"

Required Parameters

-Name

Name of the IoT hub.

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

Name of the resource group.

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

Optional Parameters

-KeyName

Name of the key.

Type:String
Position:2
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

Inputs

System.String

Outputs

Microsoft.Azure.Commands.Management.IotHub.Models.PSSharedAccessSignatureAuthorizationRule

System.Collections.Generic.List`1[[Microsoft.Azure.Commands.Management.IotHub.Models.PSSharedAccessSignatureAuthorizationRule, Microsoft.Azure.Commands.IotHub, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]