Get-AzIotHubCertificate
Lists all certificates or a particular certificate contained within an Azure IoT Hub.
Syntax
ResourceSet (Default)
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
Examples
Example 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
List all certificates in MyIotHub
Example 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=
Show details about MyCertificate
Parameters
-CertificateName
Name of the Certificate
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.
Parameter properties
Type: IAzureContextContainer
Default value: None
Supports wildcards: False
DontShow: False
Aliases: AzContext, AzureRmContext, AzureCredential
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
IotHub Object
Type: PSIotHub
Default value: None
Supports wildcards: False
DontShow: False
InputObjectSet
Position: 0
Mandatory: True
Value from pipeline: True
Value from pipeline by property name: False
Value from remaining arguments: False
-Name
Name of the Iot Hub
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
ResourceSet
Position: 1
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-ResourceGroupName
Name of the Resource Group
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
ResourceSet
Position: 0
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-ResourceId
IotHub Resource Id
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
ResourceIdSet
Position: 0
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable,
-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see
about_CommonParameters .
Outputs