< Back

Get-AzureRmIotHubCertificate

Tue Jan 29, 2019 9:49 pm

NAME Get-AzureRmIotHubCertificate



SYNOPSIS

Lists all certificates or a particular certificate contained within an Azure IoT Hub.





SYNTAX

Get-AzureRmIotHubCertificate [-InputObject] <PSIotHub> [-CertificateName <String>] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]



Get-AzureRmIotHubCertificate [-ResourceGroupName] <String> [-Name] <String> [-CertificateName <String>] [-DefaultProfile <IAzureContextContainer>]

[<CommonParameters>]



Get-AzureRmIotHubCertificate [-ResourceId] <String> [-CertificateName <String>] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]





DESCRIPTION

For a detailed explanation of CA certificates in Azure IoT Hub, see https://docs.microsoft.com/en-us/azure/ ... a-overview





PARAMETERS

-CertificateName <String>

Name of the Certificate



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-DefaultProfile <IAzureContextContainer>

The credentials, account, tenant, and subscription used for communication with azure.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-InputObject <PSIotHub>

IotHub Object



Required? true

Position? 0

Default value None

Accept pipeline input? True (ByValue)

Accept wildcard characters? false



-Name <String>

Name of the Iot Hub



Required? true

Position? 1

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-ResourceGroupName <String>

Name of the Resource Group



Required? true

Position? 0

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-ResourceId <String>

IotHub Resource Id



Required? true

Position? 0

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).



INPUTS

System.String







OUTPUTS

Microsoft.Azure.Commands.Management.IotHub.Models.PSCertificateDescription

System.Collections.Generic.IList`1[[Microsoft.Azure.Commands.Management.IotHub.Models.PSCertificateDescription,

Microsoft.Azure.Commands.IotHub, Version=3.0.0.0, Culture=neutral, PublicKeyToken=null]]





NOTES









Example 1



PS C:\\> Get-AzureRmIotHubCertificate -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



PS C:\\> Get-AzureRmIotHubCertificate -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







RELATED LINKS

Online Version: https://docs.microsoft.com/en-us/powers ... ertificate