Set-AzAutomationCertificate
语法
Default (默认值)
Set-AzAutomationCertificate
[-Name] <String>
[-Description <String>]
[-Password <SecureString>]
[-Path <String>]
[-Exportable <Boolean>]
[-ResourceGroupName] <String>
[-AutomationAccountName] <String>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
说明
Set-AzAutomationCertificate cmdlet 修改 Azure 自动化中证书的配置。
示例
示例 1:修改证书
$Password = ConvertTo-SecureString -String "****" -AsPlainText -Force
Set-AzAutomationCertificate -AutomationAccountName "Contos17" -Name "ContosoCertificate" -Path "./cert.pfx" -Password $Password -ResourceGroupName "ResourceGroup01"
第一个命令使用 ConvertTo-SecureString cmdlet 将纯文本密码转换为安全字符串。
该命令将该对象存储在$Password变量中。
第二个命令修改名为 ContosoCertificate 的证书。
该命令使用存储在$Password中的密码。
该命令指定其上传的文件的帐户名和路径。
参数
-AutomationAccountName
指定此 cmdlet 修改证书的自动化帐户的名称。
参数属性
类型: | String
|
默认值: | None |
支持通配符: | False |
不显示: | False |
参数集
(All)
Position: | 1 |
必需: | True |
来自管道的值: | False |
来自管道的值(按属性名称): | True |
来自剩余参数的值: | False |
-DefaultProfile
用于与 azure 通信的凭据、帐户、租户和订阅
参数属性
参数集
(All)
Position: | Named |
必需: | False |
来自管道的值: | False |
来自管道的值(按属性名称): | False |
来自剩余参数的值: | False |
-Description
指定此 cmdlet 修改的证书的说明。
参数属性
类型: | String
|
默认值: | None |
支持通配符: | False |
不显示: | False |
参数集
(All)
Position: | Named |
必需: | False |
来自管道的值: | False |
来自管道的值(按属性名称): | True |
来自剩余参数的值: | False |
-Exportable
指定是否可以导出证书。
参数属性
参数集
(All)
Position: | Named |
必需: | False |
来自管道的值: | False |
来自管道的值(按属性名称): | True |
来自剩余参数的值: | False |
-Name
指定此 cmdlet 修改的证书的名称。
参数属性
类型: | String
|
默认值: | None |
支持通配符: | False |
不显示: | False |
参数集
(All)
Position: | 2 |
必需: | True |
来自管道的值: | False |
来自管道的值(按属性名称): | True |
来自剩余参数的值: | False |
-Password
指定证书文件的密码。
参数属性
参数集
(All)
Position: | Named |
必需: | False |
来自管道的值: | False |
来自管道的值(按属性名称): | True |
来自剩余参数的值: | False |
-Path
指定要上传的脚本文件的路径。
该文件可以是.cer文件或 .pfx 文件。
参数属性
类型: | String
|
默认值: | None |
支持通配符: | False |
不显示: | False |
参数集
(All)
Position: | Named |
必需: | False |
来自管道的值: | False |
来自管道的值(按属性名称): | True |
来自剩余参数的值: | False |
-ResourceGroupName
指定此 cmdlet 修改证书的资源组的名称。
参数属性
类型: | String
|
默认值: | None |
支持通配符: | False |
不显示: | False |
参数集
(All)
Position: | 0 |
必需: | True |
来自管道的值: | False |
来自管道的值(按属性名称): | True |
来自剩余参数的值: | False |
CommonParameters
此 cmdlet 支持通用参数:-Debug、-ErrorAction、-ErrorVariable、-InformationAction、-InformationVariable、-OutBuffer、-OutVariable、-PipelineVariable、-ProgressAction、-Verbose、-WarningAction 和 -WarningVariable。 有关详细信息,请参阅 about_CommonParameters。
输出