< Back
Add-AzureRmIotHubCertificate
Post
NAME Add-AzureRmIotHubCertificate
SYNOPSIS
Create/update an Azure IoT Hub certificate.
SYNTAX
Add-AzureRmIotHubCertificate [-ResourceGroupName] <String> [-CertificateName] <String> [-Name] <String> [-Path] <String> [-DefaultProfile
<IAzureContextContainer>] [-Etag <String>] [-Confirm] [-WhatIf] [<CommonParameters>]
Add-AzureRmIotHubCertificate [-InputObject] <PSCertificateDescription> [-Path] <String> [-DefaultProfile <IAzureContextContainer>] [-Etag
<String>] [-Confirm] [-WhatIf] [<CommonParameters>]
Add-AzureRmIotHubCertificate [-ResourceId] <String> [-Path] <String> [-DefaultProfile <IAzureContextContainer>] [-Etag <String>] [-Confirm]
[-WhatIf] [<CommonParameters>]
DESCRIPTION
Uploads a new certificate or to replace the existing certificate with the same name. 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? true
Position? 1
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
-Etag <String>
Etag of the Certificate
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-InputObject <PSCertificateDescription>
Certificate 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? True (ByPropertyName)
Accept wildcard characters? false
-Path <String>
base-64 representation of X509 certificate .cer file or .pem file path.
Required? true
Position? 2
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>
Certificate Resource Id
Required? true
Position? 0
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Confirm [<SwitchParameter>]
Prompts you for confirmation before running the cmdlet.
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-WhatIf [<SwitchParameter>]
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Required? false
Position? named
Default value False
Accept pipeline input? False
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
NOTES
Example 1
PS C:\\> Add-AzureRmIotHubCertificate -ResourceGroupName "myresourcegroup" -Name "myiothub" -CertificateName "mycertificate" -Path
"c:\\mycertificate.cer"
Id : /subscriptions/377cxxxxxxxxxxxx/resourceGroups/myresourcegroup/providers/Microsoft.Devices/IotHubs/myiothub/certificates/mycertificate
ResourceGroupName : myresourcegroup
Name : myiothub
CertificateName : mycertificate
Subject : CN=mycertificate
Thumbprint : 38303FC7371EC78DDE3E18D712C8414EE50969C7
Status : Unverified
Expiry : 1/01/2027 16:01
Created : 1/01/2017 16:01
Etag : AAAAAAFpGcA=
Uploads a CA certificate CER file to an IoT hub.
Example 2
PS C:\\> Add-AzureRmIotHubCertificate -ResourceGroupName "myresourcegroup" -Name "myiothub" -CertificateName "mycertificate" -Path
"c:\\mycertificate.cer" -Etag "AAAAAAFPazE="
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=
Updates a CA certificate in an IoT hub by uploading a new CER file.
RELATED LINKS
Online Version: https://docs.microsoft.com/en-us/powers ... ertificate
SYNOPSIS
Create/update an Azure IoT Hub certificate.
SYNTAX
Add-AzureRmIotHubCertificate [-ResourceGroupName] <String> [-CertificateName] <String> [-Name] <String> [-Path] <String> [-DefaultProfile
<IAzureContextContainer>] [-Etag <String>] [-Confirm] [-WhatIf] [<CommonParameters>]
Add-AzureRmIotHubCertificate [-InputObject] <PSCertificateDescription> [-Path] <String> [-DefaultProfile <IAzureContextContainer>] [-Etag
<String>] [-Confirm] [-WhatIf] [<CommonParameters>]
Add-AzureRmIotHubCertificate [-ResourceId] <String> [-Path] <String> [-DefaultProfile <IAzureContextContainer>] [-Etag <String>] [-Confirm]
[-WhatIf] [<CommonParameters>]
DESCRIPTION
Uploads a new certificate or to replace the existing certificate with the same name. 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? true
Position? 1
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
-Etag <String>
Etag of the Certificate
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-InputObject <PSCertificateDescription>
Certificate 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? True (ByPropertyName)
Accept wildcard characters? false
-Path <String>
base-64 representation of X509 certificate .cer file or .pem file path.
Required? true
Position? 2
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>
Certificate Resource Id
Required? true
Position? 0
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Confirm [<SwitchParameter>]
Prompts you for confirmation before running the cmdlet.
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-WhatIf [<SwitchParameter>]
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Required? false
Position? named
Default value False
Accept pipeline input? False
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
NOTES
Example 1
PS C:\\> Add-AzureRmIotHubCertificate -ResourceGroupName "myresourcegroup" -Name "myiothub" -CertificateName "mycertificate" -Path
"c:\\mycertificate.cer"
Id : /subscriptions/377cxxxxxxxxxxxx/resourceGroups/myresourcegroup/providers/Microsoft.Devices/IotHubs/myiothub/certificates/mycertificate
ResourceGroupName : myresourcegroup
Name : myiothub
CertificateName : mycertificate
Subject : CN=mycertificate
Thumbprint : 38303FC7371EC78DDE3E18D712C8414EE50969C7
Status : Unverified
Expiry : 1/01/2027 16:01
Created : 1/01/2017 16:01
Etag : AAAAAAFpGcA=
Uploads a CA certificate CER file to an IoT hub.
Example 2
PS C:\\> Add-AzureRmIotHubCertificate -ResourceGroupName "myresourcegroup" -Name "myiothub" -CertificateName "mycertificate" -Path
"c:\\mycertificate.cer" -Etag "AAAAAAFPazE="
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=
Updates a CA certificate in an IoT hub by uploading a new CER file.
RELATED LINKS
Online Version: https://docs.microsoft.com/en-us/powers ... ertificate