Get-AzIotHubDevice
Een lijst met alle apparaten of een bepaald apparaat in een Azure IoT Hub.
Syntaxis
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
Haal de details van een IoT Hub-apparaat op of vermeld alle apparaten in een IoT Hub.
Voorbeelden
Voorbeeld 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
Alle apparaten weergeven in een IoT-hub.
Voorbeeld 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 :
De details van een IoT Hub-apparaat ophalen.
Parameters
-DefaultProfile
De referenties, accounts, tenants en abonnementen die worden gebruikt voor communicatie met Azure.
Type: | IAzureContextContainer |
Aliassen: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Vereist: | False |
Pijplijninvoer accepteren: | False |
Jokertekens accepteren: | False |
-DeviceId
Doelapparaat-id.
Type: | String |
Position: | Named |
Default value: | None |
Vereist: | False |
Pijplijninvoer accepteren: | False |
Jokertekens accepteren: | False |
-InputObject
IotHub-object
Type: | PSIotHub |
Position: | 0 |
Default value: | None |
Vereist: | True |
Pijplijninvoer accepteren: | True |
Jokertekens accepteren: | False |
-IotHubName
Naam van de IoT-hub
Type: | String |
Position: | 1 |
Default value: | None |
Vereist: | True |
Pijplijninvoer accepteren: | False |
Jokertekens accepteren: | False |
-ResourceGroupName
Naam van de resourcegroep
Type: | String |
Position: | 0 |
Default value: | None |
Vereist: | True |
Pijplijninvoer accepteren: | False |
Jokertekens accepteren: | False |
-ResourceId
IotHub-resource-id
Type: | String |
Position: | 0 |
Default value: | None |
Vereist: | True |
Pijplijninvoer accepteren: | True |
Jokertekens accepteren: | False |
Invoerwaarden
Uitvoerwaarden
Met ons samenwerken op GitHub
De bron voor deze inhoud vindt u op GitHub, waar u ook problemen en pull-aanvragen kunt maken en controleren. Bekijk onze gids voor inzenders voor meer informatie.
Azure PowerShell