external help file | Module Name | online version | schema |
---|---|---|---|
Microsoft.Azure.PowerShell.Cmdlets.IotHub.dll-Help.xml |
Az.IotHub |
2.0.0 |
Generate an Azure IoT Hub key.
New-AzIotHubKey [-ResourceGroupName] <String> [-Name] <String> [-KeyName] <String> [-RenewKey] <String>
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]
New-AzIotHubKey [-HubId] <String> [-KeyName] <String> [-RenewKey] <String>
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]
Generate an Azure IoT Hub key.
New-AzIotHubKey -ResourceGroupName "myresourcegroup" -Name "myiothub" -KeyName "testKey" -RenewKey "primary"
KeyName PrimaryKey SecondaryKey Rights
------- ---------- ------------ ------
test SXSdm31aT+i3939xSnA191f8g3uRhIUCTsO26b9s/nE= 6JqGKGUTL0mhQwvcOeIRT7OnT6noK/tie6jBY77sJTE= ServiceConnect
Regenerated primary key for the authorization policy "testKey" of an azure iot hub.
New-AzIotHubKey -ResourceGroupName "myresourcegroup" -Name "myiothub" -KeyName "testKey" -RenewKey "swap"
KeyName PrimaryKey SecondaryKey Rights
------- ---------- ------------ ------
test 6JqGKGUTL0mhQwvcOeIRT7OnT6noK/tie6jBY77sJTE= SXSdm31aT+i3939xSnA191f8g3uRhIUCTsO26b9s/nE= ServiceConnect
Swapping keys for the authorization policy "testKey" of an azure iot hub.
The credentials, account, tenant, and subscription used for communication with azure
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Parameter Sets: (All)
Aliases: AzContext, AzureRmContext, AzureCredential
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
IotHub Resource Id
Type: System.String
Parameter Sets: ResourceIdSet
Aliases:
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
Name of the Key
Type: System.String
Parameter Sets: ResourceSet
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
Type: System.String
Parameter Sets: ResourceIdSet
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
Name of the IotHub
Type: System.String
Parameter Sets: ResourceSet
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
Regenerate Key.
Type: System.String
Parameter Sets: (All)
Aliases:
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Resource Group Name
Type: System.String
Parameter Sets: ResourceSet
Aliases:
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).