external help file | Module Name | ms.assetid | online version | schema |
---|---|---|---|---|
Microsoft.Azure.PowerShell.Cmdlets.Automation.dll-Help.xml |
Az.Automation |
F1A2861F-14EF-4F67-8452-31FD498528BB |
2.0.0 |
Modifies the configuration of an Automation certificate.
Set-AzAutomationCertificate [-Name] <String> [-Description <String>] [-Password <SecureString>]
[-Path <String>] [-Exportable <Boolean>] [-ResourceGroupName] <String> [-AutomationAccountName] <String>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]
The Set-AzAutomationCertificate cmdlet modifies the configuration of a certificate in Azure Automation.
$Password = ConvertTo-SecureString -String "Password" -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.
Specifies the name of the Automation account for which this cmdlet modifies a certificate.
Type: System.String
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
The credentials, account, tenant, and subscription used for communication with azure
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Parameter Sets: (All)
Aliases: AzContext, AzureRmContext, AzureCredential
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Specifies a description for the certificate that this cmdlet modifies.
Type: System.String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
Specifies whether the certificate can be exported.
Type: System.Nullable`1[System.Boolean]
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
Specifies the name of the certificate that this cmdlet modifies.
Type: System.String
Parameter Sets: (All)
Aliases:
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
Specifies the password for the certificate file.
Type: System.Security.SecureString
Parameter Sets: (All)
Aliases:
Required: False
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: System.String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
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: System.String
Parameter Sets: (All)
Aliases:
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.