Freigeben über


Get-AzIotHubModuleConnectionString

Rufen Sie die Verbindungszeichenfolge eines Ziel-IoT-Gerätemoduls in einem Iot Hub ab.

Syntax

Get-AzIotHubModuleConnectionString
   [-ResourceGroupName] <String>
   [-IotHubName] <String>
   [-DeviceId] <String>
   [-ModuleId <String>]
   [-KeyType <PSKeyType>]
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]
Get-AzIotHubModuleConnectionString
   [-InputObject] <PSIotHub>
   [-DeviceId] <String>
   [-ModuleId <String>]
   [-KeyType <PSKeyType>]
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]
Get-AzIotHubModuleConnectionString
   [-ResourceId] <String>
   [-DeviceId] <String>
   [-ModuleId <String>]
   [-KeyType <PSKeyType>]
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]

Beschreibung

Auflisten Verbindungszeichenfolge aller Module oder eines angegebenen Moduls eines Ziel-IoT-Geräts, das in einem Azure IoT Hub enthalten ist.

Beispiele

Beispiel 1

Get-AzIotHubModuleConnectionString -ResourceGroupName "myresourcegroup" -IotHubName "myiothub" -Deviceid "myDevice1"

Module Id Connection String
--------- -----------------
module1   HostName=myiothub.azure-devices.net;DeviceId=myDevice1;ModuleId=module1;SharedAccessKey=/X4yj******     
module2   HostName=myiothub.azure-devices.net;DeviceId=myDevice1;ModuleId=module2;x509=true

Zeigen Sie alle Module Verbindungszeichenfolge eines Ziel-IoT-Geräts in einem Iot Hub an.

Beispiel 2

Get-AzIotHubModuleConnectionString -ResourceGroupName "myresourcegroup" -IotHubName "myiothub" -DeviceId "myDevice1" -ModuleId "module1" -KeyType secondary

Module Id Connection String
--------- -----------------
module1   HostName=myiothub.azure-devices.net;DeviceId=myDevice1;ModuleId=module1;SharedAccessKey=/X4yj******

Rufen Sie das sekundäre Modul Verbindungszeichenfolge eines Ziel-IoT-Geräts in einem Iot Hub ab.

Parameter

-DefaultProfile

Anmeldeinformationen, Konto, Mandant und Abonnement für die Kommunikation mit Azure

Typ:IAzureContextContainer
Aliase:AzContext, AzureRmContext, AzureCredential
Position:Named
Standardwert:None
Erforderlich:False
Pipelineeingabe akzeptieren:False
Platzhalterzeichen akzeptieren:False

-DeviceId

Zielgeräte-ID.

Typ:String
Position:1
Standardwert:None
Erforderlich:True
Pipelineeingabe akzeptieren:False
Platzhalterzeichen akzeptieren:False

-InputObject

IotHub-Objekt

Typ:PSIotHub
Position:0
Standardwert:None
Erforderlich:True
Pipelineeingabe akzeptieren:True
Platzhalterzeichen akzeptieren:False

-IotHubName

Name des Iot Hub

Typ:String
Position:1
Standardwert:None
Erforderlich:True
Pipelineeingabe akzeptieren:False
Platzhalterzeichen akzeptieren:False

-KeyType

Schlüsseltyp für gemeinsame Zugriffsrichtlinien für die Authentifizierung.

Typ:PSKeyType
Zulässige Werte:primary, secondary
Position:Named
Standardwert:None
Erforderlich:False
Pipelineeingabe akzeptieren:False
Platzhalterzeichen akzeptieren:False

-ModuleId

Zielmodul-ID.

Typ:String
Position:Named
Standardwert:None
Erforderlich:False
Pipelineeingabe akzeptieren:False
Platzhalterzeichen akzeptieren:False

-ResourceGroupName

Name der Ressourcengruppe

Typ:String
Position:0
Standardwert:None
Erforderlich:True
Pipelineeingabe akzeptieren:False
Platzhalterzeichen akzeptieren:False

-ResourceId

IotHub-Ressourcen-ID

Typ:String
Position:0
Standardwert:None
Erforderlich:True
Pipelineeingabe akzeptieren:True
Platzhalterzeichen akzeptieren:False

Eingaben

PSIotHub

String

Ausgaben

PSModuleConnectionString