< Back

New-AzureRmAutomationCertificate

Tue Jan 29, 2019 9:32 pm

NAME New-AzureRmAutomationCertificate



SYNOPSIS

Creates an Automation certificate.





SYNTAX

New-AzureRmAutomationCertificate [-ResourceGroupName] <String> [-AutomationAccountName] <String> [-Name] <String> [-Path] <String>

[-DefaultProfile <IAzureContextContainer>] [-Description <String>] [-Exportable] [-Password <SecureString>] [<CommonParameters>]





DESCRIPTION

The New-AzureRmAutomationCertificate cmdlet creates a certificate in Azure Automation. Provide the path to a certificate file to upload.





PARAMETERS

-AutomationAccountName <String>

Specifies the name of the Automation account for which this cmdlet stores the certificate.



Required? true

Position? 1

Default value None

Accept pipeline input? True (ByPropertyName)

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



-Description <String>

Specifies a description for the certificate.



Required? false

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-Exportable [<SwitchParameter>]

Specifies whether the certificate can be exported.



Required? false

Position? named

Default value False

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-Name <String>

Specifies the name for the certificate.



Required? true

Position? 2

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-Password <SecureString>

Specifies the password for the certificate file.



Required? false

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-Path <String>

Specifies the path to a script file that this cmdlet uploads. The file can be a .cer or a .pfx file.



Required? true

Position? 2

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-ResourceGroupName <String>

Specifies the name of the resource group for which this cmdlet creates a certificate.



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

None

This cmdlet does not accept any input.





OUTPUTS

Microsoft.Azure.Commands.Automation.Model.CertificateInfo







NOTES









Example 1: Create a new certificate



PS C:\\>$Password = ConvertTo-SecureString -String "Password" -AsPlainText -Force

PS C:\\> New-AzureRmAutomationCertificate -AutomationAccountName "Contoso17" -Name "ContosoCertificate" -Path "./cert.pfx" -Password $Password

-ResourceGroupName "ResourceGroup01"



The first command converts a plain text password to be a secure string by using the ConvertTo-SecureString cmdlet. The command stores that object

in the $Password variable.



The second command creates a certificate named ContosoCertificate. The command uses the password stored in $Password. The command specifies the

account name and the path of the file that it uploads.







RELATED LINKS

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

Get-AzureRmAutomationCertificate

Remove-AzureRmAutomationCertificate

Set-AzureRmAutomationCertificate