Get-​Azure​Rm​Iot​Hub​Key

Gets an IotHub Key.

Syntax

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

Description

Gets an IotHub Key. You can either list all Keys or filter the list by a specific Key Name.

Examples

Example 1 Get all Keys

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

Gets all the Keys for the IotHub named "myiothub"

Example 2 Get information for a specific Key

PS C:\> Get-AzureRmIotHubKey -ResourceGroupName "myresourcegroup" -Name "myiothub" -KeyName "iothubowner"

Gets the information for a key named "iothubowner" 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

Resource Group Name

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]]