Dela via


Set-AzIotHubDevice

Uppdatera en IoT Hub-enhet.

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

Description

Uppdatera en IoT Hub-enhet.

Exempel

Exempel 1

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

Aktivera gränsfunktioner för enheten.

Exempel 2

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

Inaktivera enhetsstatus.

Exempel 3

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

Uppdatera auktoriseringstypen för en Iot Hub-enhet.

Parametrar

-AuthMethod

Auktoriseringstypen som en entitet ska skapas med.

Typ:PSDeviceAuthType
Godkända värden:shared_private_key, x509_thumbprint, x509_ca
Position:Named
Standardvärde:None
Obligatorisk:False
Godkänn pipeline-indata:False
Godkänn jokertecken:False

-Confirm

Uppmanar dig att bekräfta innan du kör cmdleten.

Typ:SwitchParameter
Alias:cf
Position:Named
Standardvärde:None
Obligatorisk:False
Godkänn pipeline-indata:False
Godkänn jokertecken:False

-DefaultProfile

Autentiseringsuppgifter, konto, klientorganisation och prenumeration som används för kommunikation med Azure.

Typ:IAzureContextContainer
Alias:AzContext, AzureRmContext, AzureCredential
Position:Named
Standardvärde:None
Obligatorisk:False
Godkänn pipeline-indata:False
Godkänn jokertecken:False

-DeviceId

Målenhets-ID.

Typ:String
Position:1
Standardvärde:None
Obligatorisk:True
Godkänn pipeline-indata:False
Godkänn jokertecken:False

-EdgeEnabled

Flagga som anger kantaktivering.

Typ:Boolean
Position:Named
Standardvärde:None
Obligatorisk:False
Godkänn pipeline-indata:False
Godkänn jokertecken:False

-InputObject

IotHub-objekt

Typ:PSIotHub
Position:0
Standardvärde:None
Obligatorisk:True
Godkänn pipeline-indata:True
Godkänn jokertecken:False

-IotHubName

Namnet på Iot Hub

Typ:String
Position:1
Standardvärde:None
Obligatorisk:True
Godkänn pipeline-indata:False
Godkänn jokertecken:False

-PrimaryThumbprint

Explicit självsignerat tumavtryck för certifikat som ska användas för primärnyckel.

Typ:String
Position:Named
Standardvärde:None
Obligatorisk:True
Godkänn pipeline-indata:False
Godkänn jokertecken:False

-ResourceGroupName

Namnet på resursgruppen

Typ:String
Position:0
Standardvärde:None
Obligatorisk:True
Godkänn pipeline-indata:False
Godkänn jokertecken:False

-ResourceId

IotHub-resurs-ID

Typ:String
Position:0
Standardvärde:None
Obligatorisk:True
Godkänn pipeline-indata:True
Godkänn jokertecken:False

-SecondaryThumbprint

Explicit självsignerat tumavtryck för certifikat som ska användas för sekundär nyckel.

Typ:String
Position:Named
Standardvärde:None
Obligatorisk:False
Godkänn pipeline-indata:False
Godkänn jokertecken:False

-Status

Ange enhetsstatus när du skapar den.

Typ:PSDeviceStatus
Godkända värden:Enabled, Disabled
Position:Named
Standardvärde:None
Obligatorisk:False
Godkänn pipeline-indata:False
Godkänn jokertecken:False

-StatusReason

Beskrivning av enhetsstatus.

Typ:String
Position:Named
Standardvärde:None
Obligatorisk:False
Godkänn pipeline-indata:False
Godkänn jokertecken:False

-WhatIf

Visar vad som skulle hända om cmdleten körs. Cmdleten körs inte.

Typ:SwitchParameter
Alias:wi
Position:Named
Standardvärde:None
Obligatorisk:False
Godkänn pipeline-indata:False
Godkänn jokertecken:False

Indata

PSIotHub

String

Utdata

PSDevice