Get-AzIoTDeviceProvisioningServiceCertificate
Lists all certificates or a particular certificate contained within an Azure IoT Hub Device Provisioning Service.
Syntax
Get-AzIoTDeviceProvisioningServiceCertificate
[-ResourceGroupName] <String>
[-Name] <String>
[-CertificateName <String>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Get-AzIoTDeviceProvisioningServiceCertificate
[-DpsObject] <PSProvisioningServiceDescription>
[-CertificateName <String>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Get-AzIoTDeviceProvisioningServiceCertificate
[-ResourceId] <String>
[-CertificateName <String>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
For a detailed explanation of CA certificates in Azure IoT Hub Device Provisioning Service, see https://learn.microsoft.com/azure/iot-dps/how-to-verify-certificates.
Examples
Example 1
Get-AzIoTDeviceProvisioningServiceCertificate -ResourceGroupName "myresourcegroup" -Name "myiotdps" -CertificateName "mycertificate"
Id : /subscriptions/377cxxxxxxxxxxxx/resourceGroups/myresourcegroup/providers/Microsoft.Devices/provisioningServices/myiotdps/certificates/mycertificate
ResourceGroupName : myresourcegroup
Name : myiotdps
CertificateName : mycertificate
Subject : CN=mycertificate
Thumbprint : 38303FC7371EC78DDE3E18D712C8414EE50969C7
Status : Unverified
Expiry : 1/01/2027 16:01
Created : 1/01/2017 16:01
Etag : AAAAAAFpGcA=
Show details about "mycertificate" in an Azure IoT Hub device provisioning service.
Example 2
Get-AzIoTDeviceProvisioningService -ResourceGroupName "myresourcegroup" -Name "myiotdps" | Get-AzIoTDeviceProvisioningServiceCertificate
ResourceGroupName Name CertificateName Status Expiry
----------------- ---- --------------- ------ ------
myresourcegroup myiotdps mycert1 Unverified 12/04/2027 13:12
myresourcegroup myiotdps mycert2 Unverified 12/04/2027 13:12
List all certificates in "myiotdps" using pipeline.
Parameters
-CertificateName
Name of the Certificate
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Type: | IAzureContextContainer |
Aliases: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DpsObject
IoT Device Provisioning Service Object
Type: | PSProvisioningServiceDescription |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Name
Name of the IoT Device Provisioning Service
Type: | String |
Position: | 1 |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ResourceGroupName
Name of the Resource Group
Type: | String |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ResourceId
IoT Device Provisioning Service Resource Id
Type: | String |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Inputs
PSProvisioningServiceDescription
Outputs
Azure PowerShell