Delen via


Set-AzIotHubDeviceParent

Stel het bovenliggende apparaat van het opgegeven apparaat in.

Syntaxis

Set-AzIotHubDeviceParent
   [-ResourceGroupName] <String>
   [-IotHubName] <String>
   [-DeviceId] <String>
   [-ParentDeviceId] <String>
   [-Force]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Set-AzIotHubDeviceParent
   [-InputObject] <PSIotHub>
   [-DeviceId] <String>
   [-ParentDeviceId] <String>
   [-Force]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Set-AzIotHubDeviceParent
   [-ResourceId] <String>
   [-DeviceId] <String>
   [-ParentDeviceId] <String>
   [-Force]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

Stel het bovenliggende apparaat van het opgegeven niet-edge-apparaat in.

Voorbeelden

Voorbeeld 1

Set-AzIotHubDeviceParent -ResourceGroupName "myresourcegroup" -IotHubName "myiothub" -DeviceId "myDevice1" -ParentDeviceId "myParentDevice1"

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                     : Enabled
StatusReason               : 
StatusUpdatedTime          : 1/17/2020 10:15:04 PM
CloudToDeviceMessageCount  : 0
Authentication             : Sas
EdgeEnabled                : False
DeviceScope                : ms-azure-iot-edge://myParentDevice1-637176526047419634

Parameters

-Confirm

U wordt gevraagd om bevestiging voordat u de cmdlet uitvoert.

Type:SwitchParameter
Aliassen:cf
Position:Named
Default value:None
Vereist:False
Pijplijninvoer accepteren:False
Jokertekens accepteren:False

-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

Id van niet-edge-apparaat.

Type:String
Position:1
Default value:None
Vereist:True
Pijplijninvoer accepteren:False
Jokertekens accepteren:False

-Force

Overschrijft het bovenliggende apparaat van het niet-edge-apparaat.

Type:SwitchParameter
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

-ParentDeviceId

Id van edge-apparaat.

Type:String
Position:2
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

-WhatIf

Toont wat er zou gebeuren als de cmdlet wordt uitgevoerd. De cmdlet wordt niet uitgevoerd.

Type:SwitchParameter
Aliassen:wi
Position:Named
Default value:None
Vereist:False
Pijplijninvoer accepteren:False
Jokertekens accepteren:False

Invoerwaarden

PSIotHub

String

Uitvoerwaarden

PSDevice