Skip to content

Latest commit

 

History

History
187 lines (140 loc) · 4.64 KB

Set-AzAutomationCertificate.md

File metadata and controls

187 lines (140 loc) · 4.64 KB
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

Set-AzAutomationCertificate

SYNOPSIS

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 "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.

PARAMETERS

-AutomationAccountName

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

-DefaultProfile

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

-Description

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

-Exportable

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

-Name

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

-Password

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

-Path

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

-ResourceGroupName

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

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

System.String

System.Security.SecureString

System.Nullable`1[[System.Boolean, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]

OUTPUTS

Microsoft.Azure.Commands.Automation.Model.CertificateInfo

NOTES

RELATED LINKS

Get-AzAutomationCertificate

New-AzAutomationCertificate

Remove-AzAutomationCertificate