Dela via


Get-AzIotHubDeviceTwin

Hämtar en enhetstvilling.

Syntax

Get-AzIotHubDeviceTwin
   [-ResourceGroupName] <String>
   [-IotHubName] <String>
   [-DeviceId] <String>
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]
Get-AzIotHubDeviceTwin
   [-InputObject] <PSIotHub>
   [-DeviceId] <String>
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]
Get-AzIotHubDeviceTwin
   [-ResourceId] <String>
   [-DeviceId] <String>
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]

Description

Hämtar en enhetstvilling. Mer information finns i https://learn.microsoft.com/azure/iot-hub/iot-hub-devguide-device-twins.

Exempel

Exempel 1

Get-AzIotHubDeviceTwin -ResourceGroupName "myresourcegroup" -IotHubName "myiothub" -DeviceId "myDevice1"

Returnerar enhetstvillingobjektet.

Parametrar

-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

-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

-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

Indata

Utdata