Invoke-AzIotHubDeviceMethod
Roep een directe methode aan op een apparaat.
Syntaxis
Invoke-AzIotHubDeviceMethod
[-ResourceGroupName] <String>
[-IotHubName] <String>
[-DeviceId] <String>
-Name <String>
[-Payload <String>]
[-ResponseTimeOut <Int32>]
[-ConnectionTimeOut <Int32>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Invoke-AzIotHubDeviceMethod
[-InputObject] <PSIotHub>
[-DeviceId] <String>
-Name <String>
[-Payload <String>]
[-ResponseTimeOut <Int32>]
[-ConnectionTimeOut <Int32>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Invoke-AzIotHubDeviceMethod
[-ResourceId] <String>
[-DeviceId] <String>
-Name <String>
[-Payload <String>]
[-ResponseTimeOut <Int32>]
[-ConnectionTimeOut <Int32>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
Roep een directe methode aan op een apparaat. Zie https://learn.microsoft.com/azure/iot-hub/iot-hub-devguide-direct-methods voor meer informatie.
Voorbeelden
Voorbeeld 1
Invoke-AzIotHubDeviceMethod -ResourceGroupName "myresourcegroup" -IotHubName "myiothub" -DeviceId "myDevice1" -Name "methodName" -ResponseTimeOut 20 -ConnectionTimeOut 15
Een apparaatmethode aanroepen.
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 |
-ConnectionTimeOut
Het aantal seconden dat moet worden gewacht totdat een verbinding tot stand is gebracht. De standaardwaarde is 10.
Type: | Int32 |
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
Doelapparaat-id.
Type: | String |
Position: | 1 |
Default value: | None |
Vereist: | True |
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 |
-Name
De naam van de methode die moet worden aangeroepen op dit apparaat.
Type: | String |
Position: | Named |
Default value: | None |
Vereist: | True |
Pijplijninvoer accepteren: | False |
Jokertekens accepteren: | False |
-Payload
De nettolading voor de methode die op dit apparaat moet worden aangeroepen.
Type: | String |
Position: | Named |
Default value: | None |
Vereist: | False |
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 |
-ResponseTimeOut
Het aantal seconden dat moet worden gewacht totdat een resultaat wordt ontvangen van de directe methode. De standaardwaarde is 10.
Type: | Int32 |
Position: | Named |
Default value: | None |
Vereist: | False |
Pijplijninvoer accepteren: | False |
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
Uitvoerwaarden
Azure PowerShell