Get-AzIotHubModuleConnectionString
Hämta anslutningssträngen för en IoT-målenhetsmodul i en Iot Hub.
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>]
Description
Visa en lista över anslutningssträngar för alla moduler eller en angiven modul för en mål-IoT-enhet som finns i en Azure IoT Hub.
Exempel
Exempel 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
Visa alla modulers anslutningssträng för en mål-IoT-enhet i en Iot Hub.
Exempel 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******
Hämta den sekundära modulanslutningssträngen för en IoT-målenhet i en Iot Hub.
Parametrar
-DefaultProfile
Autentiseringsuppgifter, konto, klientorganisation och prenumeration som används för kommunikation med Azure.
Typ: | IAzureContextContainer |
Alias: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
Standardvärde: | None |
Obligatorisk: | False |
Godkänn pipeline-indata: | False |
Godkänn jokertecken: | False |
-DeviceId
Målenhets-ID.
Typ: | String |
Position: | 1 |
Standardvärde: | None |
Obligatorisk: | True |
Godkänn pipeline-indata: | False |
Godkänn jokertecken: | False |
-InputObject
IotHub-objekt
Typ: | PSIotHub |
Position: | 0 |
Standardvärde: | None |
Obligatorisk: | True |
Godkänn pipeline-indata: | True |
Godkänn jokertecken: | False |
-IotHubName
Namnet på Iot Hub
Typ: | String |
Position: | 1 |
Standardvärde: | None |
Obligatorisk: | True |
Godkänn pipeline-indata: | False |
Godkänn jokertecken: | False |
-KeyType
Nyckeltyp för princip för delad åtkomst för autentisering.
Typ: | PSKeyType |
Godkända värden: | primary, secondary |
Position: | Named |
Standardvärde: | None |
Obligatorisk: | False |
Godkänn pipeline-indata: | False |
Godkänn jokertecken: | False |
-ModuleId
Målmodul-ID.
Typ: | String |
Position: | Named |
Standardvärde: | None |
Obligatorisk: | False |
Godkänn pipeline-indata: | False |
Godkänn jokertecken: | False |
-ResourceGroupName
Namnet på resursgruppen
Typ: | String |
Position: | 0 |
Standardvärde: | None |
Obligatorisk: | True |
Godkänn pipeline-indata: | False |
Godkänn jokertecken: | False |
-ResourceId
IotHub-resurs-ID
Typ: | String |
Position: | 0 |
Standardvärde: | None |
Obligatorisk: | True |
Godkänn pipeline-indata: | True |
Godkänn jokertecken: | False |
Indata
Utdata
Azure PowerShell