Freigeben über


Set-AzIotHubDevice

Aktualisieren sie ein IoT Hub-Gerät.

Syntax

Set-AzIotHubDevice
   [-ResourceGroupName] <String>
   [-IotHubName] <String>
   [-DeviceId] <String>
   [-Status <PSDeviceStatus>]
   [-StatusReason <String>]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Set-AzIotHubDevice
   [-InputObject] <PSIotHub>
   [-DeviceId] <String>
   [-AuthMethod <PSDeviceAuthType>]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Set-AzIotHubDevice
   [-InputObject] <PSIotHub>
   [-DeviceId] <String>
   [-Status <PSDeviceStatus>]
   [-StatusReason <String>]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Set-AzIotHubDevice
   [-InputObject] <PSIotHub>
   [-DeviceId] <String>
   [-EdgeEnabled <Boolean>]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Set-AzIotHubDevice
   [-ResourceGroupName] <String>
   [-IotHubName] <String>
   [-DeviceId] <String>
   [-AuthMethod <PSDeviceAuthType>]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Set-AzIotHubDevice
   [-ResourceGroupName] <String>
   [-IotHubName] <String>
   [-DeviceId] <String>
   [-EdgeEnabled <Boolean>]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Set-AzIotHubDevice
   [-ResourceId] <String>
   [-DeviceId] <String>
   [-AuthMethod <PSDeviceAuthType>]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Set-AzIotHubDevice
   [-ResourceId] <String>
   [-DeviceId] <String>
   [-Status <PSDeviceStatus>]
   [-StatusReason <String>]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Set-AzIotHubDevice
   [-ResourceId] <String>
   [-DeviceId] <String>
   [-EdgeEnabled <Boolean>]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Beschreibung

Aktualisieren sie ein IoT Hub-Gerät.

Beispiele

Beispiel 1

Set-AzIotHubDevice -ResourceGroupName "myresourcegroup" -IotHubName "myiothub" -DeviceId "myDevice1" -EdgeEnabled $true

Aktivieren Sie Edgefunktionen für das Gerät.

Beispiel 2

Set-AzIotHubDevice -ResourceGroupName "myresourcegroup" -IotHubName "myiothub" -DeviceId "myDevice1" -Status Disabled

Gerätestatus deaktivieren.

Beispiel 3

Set-AzIotHubDevice -ResourceGroupName "myresourcegroup" -IotHubName "myiothub" -DeviceId "myDevice1" -AuthMethod "x509_ca"

Aktualisieren sie den Autorisierungstyp eines Iot Hub-Geräts.

Parameter

-AuthMethod

Der Autorisierungstyp, mit dem eine Entität erstellt werden soll.

Typ:PSDeviceAuthType
Zulässige Werte:shared_private_key, x509_thumbprint, x509_ca
Position:Named
Standardwert:None
Erforderlich:False
Accept pipeline input:False
Accept wildcard characters:False

-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

-DeviceId

Zielgeräte-ID.

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

-EdgeEnabled

Flag, das die Randaktivierung angibt.

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

-InputObject

IotHub-Objekt

Typ:PSIotHub
Position:0
Standardwert:None
Erforderlich:True
Accept pipeline input:True
Accept wildcard characters:False

-IotHubName

Name des Iot Hub

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

-PrimaryThumbprint

Expliziter selbstsignierter Zertifikatfingerabdruck, der für den Primärschlüssel verwendet werden soll.

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

-ResourceGroupName

Name der Ressourcengruppe

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

-ResourceId

IotHub-Ressourcen-ID

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

-SecondaryThumbprint

Expliziter selbstsignierter Zertifikatfingerabdruck, der für sekundären Schlüssel verwendet werden soll.

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

-Status

Legen Sie den Gerätestatus beim Erstellen fest.

Typ:PSDeviceStatus
Zulässige Werte:Enabled, Disabled
Position:Named
Standardwert:None
Erforderlich:False
Accept pipeline input:False
Accept wildcard characters:False

-StatusReason

Beschreibung für den Gerätestatus.

Typ:String
Position:Named
Standardwert:None
Erforderlich:False
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

PSIotHub

String

Ausgaben

PSDevice