共用方式為


Get-AzIotHubConnectionString

取得 IotHub connectionstrings。

語法

Get-AzIotHubConnectionString
   [-ResourceGroupName] <String>
   [-Name] <String>
   [[-KeyName] <String>]
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]

Description

取得 IotHub connectionstrings。 您可以取得所有金鑰的連線字串,或依特定索引鍵名稱加以篩選。

範例

範例 1 取得所有 IotHub 連線字串

Get-AzIotHubConnectionString -ResourceGroupName "myresourcegroup" -Name "myiothub"

取得名為 「myiothub」 之 iothub 所有索引鍵的 connectionstrings

範例 2 取得特定金鑰的 IotHub 連線字串

Get-AzIotHubConnectionString -ResourceGroupName "myresourcegroup" -Name "myiothub" -KeyName "mykey"

取得名為 「mykey」 之 iothub 名為 「myiothub」 之索引鍵的 connectionstrings

參數

-DefaultProfile

用於與 azure 通訊的認證、帳戶、租用戶和訂用帳戶

類型:IAzureContextContainer
別名:AzContext, AzureRmContext, AzureCredential
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-KeyName

金鑰的名稱

類型:String
Position:2
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-Name

IotHub 的名稱

類型:String
Position:1
預設值:None
必要:True
接受管線輸入:True
接受萬用字元:False

-ResourceGroupName

資源組名

類型:String
Position:0
預設值:None
必要:True
接受管線輸入:True
接受萬用字元:False

輸入

String

輸出

PSSharedAccessSignatureAuthorizationRule