Edit

Share via


Get-AzIotHubConnectionString

Gets the IotHub connectionstrings.

Syntax

Default (Default)

Get-AzIotHubConnectionString
    [-ResourceGroupName] <String>
    [-Name] <String>
    [[-KeyName] <String>]
    [-DefaultProfile <IAzureContextContainer>]
    [<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

Get-AzIotHubConnectionString -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

Get-AzIotHubConnectionString -ResourceGroupName "myresourcegroup" -Name "myiothub" -KeyName "mykey"

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

Parameters

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with azure

Parameter properties

Type:IAzureContextContainer
Default value:None
Supports wildcards:False
DontShow:False
Aliases:AzContext, AzureRmContext, AzureCredential

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-KeyName

Name of the Key

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:2
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Name

Name of the IotHub

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:1
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-ResourceGroupName

Resource Group Name

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:0
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

String

Outputs

PSSharedAccessSignatureAuthorizationRule