Get-AzIotHubDeviceConnectionString
Hämta anslutningssträngen för en IoT-målenhet i en Iot Hub.
Syntax
Get-AzIotHubDeviceConnectionString
[-ResourceGroupName] <String>
[-IotHubName] <String>
[-DeviceId <String>]
[-KeyType <PSKeyType>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Get-AzIotHubDeviceConnectionString
[-InputObject] <PSIotHub>
[-DeviceId <String>]
[-KeyType <PSKeyType>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Get-AzIotHubDeviceConnectionString
[-ResourceId] <String>
[-DeviceId <String>]
[-KeyType <PSKeyType>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
Visa en lista över anslutningssträngar för alla enheter eller en IoT-målenhet som finns i en Azure IoT Hub.
Exempel
Exempel 1
Get-AzIotHubDeviceConnectionString -ResourceGroupName "myresourcegroup" -IotHubName "myiothub"
Device Id Connection String
--------- -----------------
device1 HostName=myiothub.azure-devices.net;DeviceId=device1;SharedAccessKey=/X4y******
device2 HostName=myiothub.azure-devices.net;DeviceId=device2;x509=true
Visa alla enheters anslutningssträng i en Iot Hub.
Exempel 2
Get-AzIotHubDeviceConnectionString -ResourceGroupName "myresourcegroup" -IotHubName "myiothub" -DeviceId "device1" -KeyType secondary
Device Id Connection String
--------- -----------------
device1 HostName=myiothub.azure-devices.net;DeviceId=device1;SharedAccessKey=/X4y******
Hämta den sekundära anslutningssträngen för en IoT-enhet.
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: | Named |
Standardvärde: | None |
Obligatorisk: | False |
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 |
-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
Samarbeta med oss på GitHub
Källan för det här innehållet finns på GitHub, där du även kan skapa och granska ärenden och pull-begäranden. Se vår deltagarguide för mer information.
Azure PowerShell