< Back

Add-AzureCertificate

Wed Jan 30, 2019 5:42 pm

NAME Add-AzureCertificate



SYNOPSIS

Uploads a certificate to an Azure cloud service.





SYNTAX

Add-AzureCertificate [-ServiceName] <String> [-CertToDeploy] <Object> [-Password <String>] [-Profile <AzureSMProfile>] [-InformationAction

<ActionPreference>] [-InformationVariable <String>] [<CommonParameters>]





DESCRIPTION

The Add-AzureCertificate cmdlet uploads a certificate for an Azure service.





PARAMETERS

-ServiceName <String>

Specifies the name of the Azure service to which this cmdlet adds a certificate.



Required? true

Position? 0

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-CertToDeploy <Object>

Specifies the certificate to deploy. You can specify the full path of a certificate file, such as a file that has a .cer or . pfx file name

extension, or an X.509 Certificate object.



Required? true

Position? 1

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Password <String>

Specifies the certificate password.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Profile <AzureSMProfile>

Specifies the Azure profile from which this cmdlet reads. If you do not specify a profile, this cmdlet reads from the local default profile.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-InformationAction <ActionPreference>





Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-InformationVariable <String>





Required? false

Position? named

Default value None

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 (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS

ManagementOperationContext







NOTES









-------------------------- Example 1: Upload a certificate and password --------------------------



PS C:\\>Add-AzureCertificate -ServiceName "ContosoService" -CertToDeploy ContosoCertificate.pfx -Password "password"



This command uploads the certificate file ContosoCertificate.pfx to a cloud service. The command specifies the password for the certificate.

-------------------------- Example 2: Upload a certificate file --------------------------



PS C:\\>Add-AzureCertificate -serviceName "MyService" -CertToDeploy ContosoCertificate.cer



This command uploads the certificate file ContosoCertificate.cer to a cloud service. The command specifies the password for the certificate.

-------------------------- Example 3: Upload a certificate object --------------------------



PS C:\\>$Certificate = Get-Item cert:\\PATTIFULLER\\MY\\1D6E34B526723E06C235BE8E5457784BF12C9F39

PS C:\\> Add-AzureCertificate -ServiceName "ContosoService" -CertToDeploy $Certificate



The first command gets a certificate from the MY store of a user by using the Windows PowerShell core Get-Item cmdlet. The command stores the

certificate in the $Certificate variable.



RELATED LINKS

Get-AzureCertificate

New-AzureCertificateSetting

Remove-AzureCertificate