Set-AzAutomationCertificate
Modifies the configuration of an Automation certificate.
Syntax
Set-AzAutomationCertificate
[-Name] <String>
[-Description <String>]
[-Password <SecureString>]
[-Path <String>]
[-Exportable <Boolean>]
[-ResourceGroupName] <String>
[-AutomationAccountName] <String>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
The Set-AzAutomationCertificate cmdlet modifies the configuration of a certificate in Azure Automation.
Examples
Example 1: Modify a certificate
$Password = ConvertTo-SecureString -String "****" -AsPlainText -Force
Set-AzAutomationCertificate -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.
Parameters
-AutomationAccountName
Specifies the name of the Automation account for which this cmdlet modifies a certificate.
Type: | String |
Position: | 1 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure
Type: | IAzureContextContainer |
Aliases: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Description
Specifies a description for the certificate that this cmdlet modifies.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Exportable
Specifies whether the certificate can be exported.
Type: | Nullable<T>[Boolean] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Name
Specifies the name of the certificate that this cmdlet modifies.
Type: | String |
Position: | 2 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Password
Specifies the password for the certificate file.
Type: | SecureString |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Path
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 |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-ResourceGroupName
Specifies the name of the resource group for which this cmdlet modifies a certificate.
Type: | String |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Inputs
Nullable<T>[[System.Boolean, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]
Outputs
Related Links
Azure PowerShell