Invoke-AzIotHubQuery
Abfragen einer IoT Hub-Instanz mithilfe einer leistungsfähigen SQL-ähnlichen Sprache.
Syntax
Invoke-AzIotHubQuery
[-ResourceGroupName] <String>
[-IotHubName] <String>
[-Query] <String>
[-Top <Int32>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Invoke-AzIotHubQuery
[-InputObject] <PSIotHub>
[-Query] <String>
[-Top <Int32>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Invoke-AzIotHubQuery
[-ResourceId] <String>
[-Query] <String>
[-Top <Int32>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Beschreibung
Fragen Sie einen IoT Hub mit einer leistungsfähigen SQL-ähnlichen Sprache ab, um Informationen zu Geräte- und Modul-Zwillingen, Aufträgen und Nachrichtenrouting abzurufen. Weitere Informationen finden Sie unter https://learn.microsoft.com/azure/iot-hub/iot-hub-devguide-query-language.
Beispiele
Beispiel 1
Invoke-AzIotHubQuery -ResourceGroupName "myresourcegroup" -IotHubName "myiothub" -Query "select * from devices"
Abfragen aller Geräte-Twin-Daten in einem Azure IoT Hub.
Beispiel 2
Invoke-AzIotHubQuery -ResourceGroupName "myresourcegroup" -IotHubName "myiothub" -Query "select * from devices.modules where devices.deviceId = 'myDevice1'" -Top 2
Abfragen der top 2-Modul-Twin-Daten auf einem Zielgerät.
Parameter
-Confirm
Hiermit werden Sie vor der Ausführung des Cmdlets zur Bestätigung aufgefordert.
Typ: | SwitchParameter |
Aliases: | cf |
Position: | Named |
Standardwert: | None |
Erforderlich: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DefaultProfile
Anmeldeinformationen, Konto, Mandant und Abonnement für die Kommunikation mit Azure
Typ: | IAzureContextContainer |
Aliases: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
Standardwert: | None |
Erforderlich: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-InputObject
IotHub-Objekt
Typ: | PSIotHub |
Position: | 0 |
Standardwert: | None |
Erforderlich: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-IotHubName
Name des Iot Hub
Typ: | String |
Position: | 1 |
Standardwert: | None |
Erforderlich: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Query
Auszuführende Benutzerabfrage.
Typ: | String |
Position: | 1 |
Standardwert: | None |
Erforderlich: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ResourceGroupName
Name der Ressourcengruppe
Typ: | String |
Position: | 0 |
Standardwert: | None |
Erforderlich: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ResourceId
IotHub-Ressourcen-ID
Typ: | String |
Position: | 0 |
Standardwert: | None |
Erforderlich: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Top
Maximale Anzahl der zurückzugebenden Elemente. Standardmäßig hat die Abfrage keine Großbuchstaben.
Typ: | Int32 |
Position: | Named |
Standardwert: | None |
Erforderlich: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-WhatIf
Zeigt, was geschieht, wenn das Cmdlet ausgeführt wird. Das Cmdlet wird nicht ausgeführt.
Typ: | SwitchParameter |
Aliases: | wi |
Position: | Named |
Standardwert: | None |
Erforderlich: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Eingaben
Ausgaben
Azure PowerShell
Feedback
https://aka.ms/ContentUserFeedback.
Bald verfügbar: Im Laufe des Jahres 2024 werden wir GitHub-Issues stufenweise als Feedbackmechanismus für Inhalte abbauen und durch ein neues Feedbacksystem ersetzen. Weitere Informationen finden Sie unterFeedback senden und anzeigen für