Get-AzIotHubDevice
Azure IoT Hub 内に含まれるすべてのデバイスまたは特定のデバイスを一覧表示します。
構文
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>]
説明
IoT Hub デバイスの詳細を取得するか、IoT Hub 内のすべてのデバイスを一覧表示します。
例
例 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
IoT ハブ内のすべてのデバイスを表示します。
例 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 :
IoT Hub デバイスの詳細を取得します。
パラメーター
-DefaultProfile
Azure との通信のために使用される資格情報、アカウント、テナント、サブスクリプションです。
Type: | IAzureContextContainer |
Aliases: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DeviceId
ターゲット デバイス ID。
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-InputObject
IotHub オブジェクト
Type: | PSIotHub |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-IotHubName
IoT ハブの名前
Type: | String |
Position: | 1 |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ResourceGroupName
リソース グループの名前
Type: | String |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ResourceId
IotHub リソース ID
Type: | String |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
入力
出力
GitHub で Microsoft と共同作業する
このコンテンツのソースは GitHub にあります。そこで、issue や pull request を作成および確認することもできます。 詳細については、共同作成者ガイドを参照してください。
Azure PowerShell
フィードバック
https://aka.ms/ContentUserFeedback」を参照してください。
以下は間もなく提供いたします。2024 年を通じて、コンテンツのフィードバック メカニズムとして GitHub の issue を段階的に廃止し、新しいフィードバック システムに置き換えます。 詳細については、「フィードバックの送信と表示