Get-AzIotHubDevice
Visar en lista över alla enheter eller en viss enhet som finns i en Azure IoT Hub.
Syntax
Get-AzIotHubDevice
[-ResourceGroupName] <String>
[-IotHubName] <String>
[-DeviceId <String>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Get-AzIotHubDevice
[-InputObject] <PSIotHub>
[-DeviceId <String>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Get-AzIotHubDevice
[-ResourceId] <String>
[-DeviceId <String>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
Hämta information om en Iot Hub-enhet eller visa en lista över alla enheter i en Iot Hub.
Exempel
Exempel 1
Get-AzIotHubDevice -ResourceGroupName "myresourcegroup" -IotHubName "myiothub"
Device Id Status Connection State Authentication Edge Enabled Last Activity Time
--------- ------ ---------------- -------------- ------------ ------------------
device1 Enabled Disconnected CertificateAuthority True 1/1/0001 12:00:00 AM
device2 Disabled Disconnected Sas False 1/1/0001 12:00:00 AM
device3 Enabled Disconnected SelfSigned False 1/1/0001 12:00:00 AM
Visa alla enheter i en Iot Hub.
Exempel 2
Get-AzIotHubDevice -ResourceGroupName "myresourcegroup" -IotHubName "myiothub" -DeviceId "myDevice1"
DeviceId : myDevice1
GenerationId : 637148941292917073
ETag : "NzIyMDI4MTk3"
LastActivityTime : 1/1/0001 12:00:00 AM
ConnectionState : Disconnected
ConnectionStateUpdatedTime : 1/1/0001 12:00:00 AM
Status : Disabled
StatusReason : Reason1
StatusUpdatedTime : 1/17/2020 10:15:04 PM
CloudToDeviceMessageCount : 0
Authentication : Sas
EdgeEnabled : False
DeviceScope :
Hämta information om en IoT Hub-enhet.
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: | 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 |
-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
Samarbeta med oss på GitHub
Källan för det här innehållet finns på GitHub, där du även kan skapa och granska ärenden och pull-begäranden. Se vår deltagarguide för mer information.
Azure PowerShell