Set-AzureRmAutomationCertificate
Syntax
Set-AzureRmAutomationCertificate
[-ResourceGroupName] <String>
[-AutomationAccountName] <String>
[-Name] <String>
[-Description <String>]
[-Exportable <Boolean>]
[-Password <SecureString>]
[-Path <String>]
[<CommonParameters>]
Description
The Set-AzureRmAutomationCertificate cmdlet modifies the configuration of a certificate in Azure Automation.
Examples
Example 1: Modify a certificate
PS C:\>$Password = ConvertTo-SecureString -String "Password" -AsPlainText -Force
PS C:\> Set-AzureAutomationCertificate -AutomationAccountName "Contos17" -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 modifies 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.
Required Parameters
Specifies the name of the Automation account for which this cmdlet modifies a certificate.
| Type: | String |
| Position: | 1 |
| Default value: | None |
| Accept pipeline input: | True (ByPropertyName) |
| Accept wildcard characters: | False |
Specifies the name of the certificate that this cmdlet modifies.
| Type: | String |
| Position: | 2 |
| Default value: | None |
| Accept pipeline input: | True (ByPropertyName) |
| Accept wildcard characters: | False |
Specifies the name of the resource group for which this cmdlet modifies a certificate.
| Type: | String |
| Position: | 0 |
| Default value: | None |
| Accept pipeline input: | True (ByPropertyName) |
| Accept wildcard characters: | False |
Optional Parameters
Specifies a description for the certificate that this cmdlet modifies.
| Type: | String |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | True (ByPropertyName) |
| Accept wildcard characters: | False |
Specifies whether the certificate can be exported.
| Type: | Boolean |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | True (ByPropertyName) |
| Accept wildcard characters: | False |
Specifies the password for the certificate file.
| Type: | SecureString |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | True (ByPropertyName) |
| Accept wildcard characters: | False |
Specifies the path to a script file to upload. The file can be a .cer file or a .pfx file.
| Type: | String |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | True (ByPropertyName) |
| Accept wildcard characters: | False |
Outputs
Microsoft.Azure.Commands.Automation.Model.CertificateInfo