Freigeben über


Update-AzIotHub

Aktualisieren sie einen Azure IoT Hub.

Syntax

Update-AzIotHub
      -ResourceGroupName <String>
      -Name <String>
      -Tag <Hashtable>
      [-Reset]
      [-DefaultProfile <IAzureContextContainer>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]

Beschreibung

Sie können die Tags-Eigenschaften eines IotHub aktualisieren.

Beispiele

Beispiel 1

$updatedTag = @{}
$updatedTag.add("key0","value0")
Update-AzIotHub -ResourceGroupName "myresourcegroup" -Name "myiothub" -Tag $updatedTag

Id             : /subscriptions/91d1xxxx-xxxx-xxxx-xxxx-xxxxxxxxddc0/resourceGroups/myresourcegroup/providers/Microsoft.De
                 vices/IotHubs/myiothub
Name           : myiothub
Type           : Microsoft.Devices/IotHubs
Location       : East US
Tags           : {[key0, value0]}
Properties     : Microsoft.Azure.Commands.Management.IotHub.Models.PSIotHubProperties
Sku            : Microsoft.Azure.Commands.Management.IotHub.Models.PSIotHubSkuInfo

Aktualisieren von Tags eines IoT-Hubs.

Parameter

-Confirm

Hiermit werden Sie vor der Ausführung des Cmdlets zur Bestätigung aufgefordert.

Typ:SwitchParameter
Aliases:cf
Position:Named
Standardwert:None
Erforderlich:False
Accept pipeline input:False
Accept wildcard characters:False

-DefaultProfile

Anmeldeinformationen, Konto, Mandant und Abonnement für die Kommunikation mit Azure

Typ:IAzureContextContainer
Aliases:AzContext, AzureRmContext, AzureCredential
Position:Named
Standardwert:None
Erforderlich:False
Accept pipeline input:False
Accept wildcard characters:False

-Name

Name des Iot Hub

Typ:String
Position:Named
Standardwert:None
Erforderlich:True
Accept pipeline input:True
Accept wildcard characters:False

-Reset

IoTHub-Tags zurücksetzen

Typ:SwitchParameter
Position:Named
Standardwert:None
Erforderlich:False
Accept pipeline input:False
Accept wildcard characters:False

-ResourceGroupName

Name der Ressourcengruppe

Typ:String
Position:Named
Standardwert:None
Erforderlich:True
Accept pipeline input:True
Accept wildcard characters:False

-Tag

IoTHub-Tag-Sammlung

Typ:Hashtable
Position:Named
Standardwert:None
Erforderlich:True
Accept pipeline input:False
Accept wildcard characters:False

-WhatIf

Zeigt, was geschieht, wenn das Cmdlet ausgeführt wird. Das Cmdlet wird nicht ausgeführt.

Typ:SwitchParameter
Aliases:wi
Position:Named
Standardwert:None
Erforderlich:False
Accept pipeline input:False
Accept wildcard characters:False

Eingaben

String

Ausgaben

PSIotHub