Get-AzIotHubCertificate
列出 Azure IoT 中樞 內所有憑證或特定憑證。
語法
ResourceSet (預設值)
Get-AzIotHubCertificate
[-ResourceGroupName] <String>
[-Name] <String>
[-CertificateName <String>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Get-AzIotHubCertificate
[-InputObject] <PSIotHub>
[-CertificateName <String>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
ResourceIdSet
Get-AzIotHubCertificate
[-ResourceId] <String>
[-CertificateName <String>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
範例
範例 1
Get-AzIotHubCertificate -ResourceGroupName "myresourcegroup" -Name "myiothub"
ResourceGroupName Name CertificateName Status Expiry
----------------- ---- --------------- ------ ------
myresourcegroup myiothub3 mycert1 Unverified 12/04/2027 13:12
myresourcegroup myiothub mycert2 Unverified 12/04/2027 13:12
列出 MyIotHub 中的所有憑證
範例 2
Get-AzIotHubCertificate -ResourceGroupName "myresourcegroup" -Name "myiothub" -CertificateName "mycertificate"
Id : /subscriptions/377cxxxxxxxxxxxx/resourceGroups/myresourcegroup/providers/Microsoft.Devices/IotHubs/myiothub/certificates/mycertificate
ResourceGroupName : myresourcegroup
Name : myiothub
CertificateName : mycertificate
Subject : CN=mycertificate
Thumbprint : 38303FC7371EC13DDE3E18D712C8414EE50969C7
Status : Unverified
Expiry : 1/01/2027 16:01
Created : 1/01/2017 16:01
Etag : AAAAAAFpObE=
顯示 MyCertificate 的詳細數據
參數
-CertificateName
憑證的名稱
參數屬性
| 類型: | String
|
| 預設值: | None |
| 支援萬用字元: | False |
| 不要顯示: | False |
參數集
(All)
| Position: | Named |
| 必要: | False |
| 來自管線的值: | False |
| 來自管線按屬性名稱的值: | False |
| 來自剩餘引數的值: | False |
-DefaultProfile
用於與 azure 通訊的認證、帳戶、租用戶和訂用帳戶。
參數屬性
參數集
(All)
| Position: | Named |
| 必要: | False |
| 來自管線的值: | False |
| 來自管線按屬性名稱的值: | False |
| 來自剩餘引數的值: | False |
IotHub 物件
| 類型: | PSIotHub
|
| 預設值: | None |
| 支援萬用字元: | False |
| 不要顯示: | False |
InputObjectSet
| Position: | 0 |
| 必要: | True |
| 來自管線的值: | True |
| 來自管線按屬性名稱的值: | False |
| 來自剩餘引數的值: | False |
-Name
IoT 中樞的名稱
參數屬性
| 類型: | String
|
| 預設值: | None |
| 支援萬用字元: | False |
| 不要顯示: | False |
參數集
ResourceSet
| Position: | 1 |
| 必要: | True |
| 來自管線的值: | False |
| 來自管線按屬性名稱的值: | False |
| 來自剩餘引數的值: | False |
-ResourceGroupName
資源群組的名稱
參數屬性
| 類型: | String
|
| 預設值: | None |
| 支援萬用字元: | False |
| 不要顯示: | False |
參數集
ResourceSet
| Position: | 0 |
| 必要: | True |
| 來自管線的值: | False |
| 來自管線按屬性名稱的值: | True |
| 來自剩餘引數的值: | False |
-ResourceId
IotHub 資源識別碼
參數屬性
| 類型: | String
|
| 預設值: | None |
| 支援萬用字元: | False |
| 不要顯示: | False |
參數集
ResourceIdSet
| Position: | 0 |
| 必要: | True |
| 來自管線的值: | False |
| 來自管線按屬性名稱的值: | True |
| 來自剩餘引數的值: | False |
CommonParameters
此 Cmdlet 支援常見參數: -Debug、-ErrorAction、-ErrorVariable、-InformationAction、-InformationVariable、-OutBuffer、-OutVariable、-PipelineVariable、-ProgressAction、-Verbose、-WarningAction 和 -WarningVariable。 如需詳細資訊,請參閱 about_CommonParameters。
輸出