Get-AzIotHubModuleConnectionString
取得IoT中樞中目標IoT裝置模組的連接字串。
語法
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
列出 Azure IoT 中樞 內含之目標 IoT 裝置之所有模組或指定模組的 連接字串。
範例
範例 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
在 IoT 中樞內顯示目標 IoT 裝置的所有模組 連接字串。
範例 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******
取得IoT中樞中目標IoT裝置的次要模組 連接字串。
參數
-DefaultProfile
用於與 Azure 通訊的認證、帳戶、租用戶和訂用帳戶。
類型: | IAzureContextContainer |
別名: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-DeviceId
目標裝置標識碼。
類型: | String |
Position: | 1 |
預設值: | None |
必要: | True |
接受管線輸入: | False |
接受萬用字元: | False |
-InputObject
IotHub 物件
類型: | PSIotHub |
Position: | 0 |
預設值: | None |
必要: | True |
接受管線輸入: | True |
接受萬用字元: | False |
-IotHubName
IoT 中樞的名稱
類型: | String |
Position: | 1 |
預設值: | None |
必要: | True |
接受管線輸入: | False |
接受萬用字元: | False |
-KeyType
用於驗證的共用存取原則金鑰類型。
類型: | PSKeyType |
接受的值: | primary, secondary |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-ModuleId
目標模組識別碼。
類型: | String |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-ResourceGroupName
資源群組的名稱
類型: | String |
Position: | 0 |
預設值: | None |
必要: | True |
接受管線輸入: | False |
接受萬用字元: | False |
-ResourceId
IotHub 資源標識碼
類型: | String |
Position: | 0 |
預設值: | None |
必要: | True |
接受管線輸入: | True |
接受萬用字元: | False |