你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
Get-AzCodeSigningRootCert
检索 Azure.CodeSigning 根证书
语法
Get-AzCodeSigningRootCert
[-AccountName] <String>
[-ProfileName] <String>
-EndpointUrl <String>
-MetadataFilePath <String>
说明
Get-AzCodeSigningRootCert cmdlet 检索 Azure CodeSigning 根证书。使用此 cmdlet 检索 Azure CodeSigning Root 证书。有两组参数。 一个集使用 AccountName、ProfileName 和 EndpointUrl。 另一组使用 MetadataFilePath。 目标是下载的根证书文件路径,该路径将排除文件名和扩展名.cer。
示例
示例 1:按帐户和配置文件名称检索根证书
Get-AzCodeSigningRootCert -AccountName 'contoso' -ProfileName 'contososigning' -EndpointUrl 'https://wus.codesigning.azure.net' -Destination 'c:\acs\rootcert.cer'
Thumbprint Subject
---------- -------
3A7B1F8C2E9D5A0B4F6E2C1D9F4B8A3E CN=Microsoft Identity Verification Root Certificate Authority 2020, O=Microsoft
此命令检索当前用于帐户和配置文件签名的根证书。
示例 2:使用元数据文件路径配置检索根证书
Get-AzCodeSigningRootCert -MetadataFilePath 'c:\cisigning\metadata_input.json' -Destination 'c:\acs\rootcert.cer'
Thumbprint Subject
---------- -------
3A7B1F8C2E9D5A0B4F6E2C1D9F4B8A3E CN=Microsoft Identity Verification Root Certificate Authority 2020, O=Microsoft
此命令检索当前用于元数据配置签名的根证书。
参数
-AccountName
指定用于对 CI 策略进行签名的 Azure CodeSigning AccountName。
类型: | String |
Position: | 1 |
默认值: | None |
必需: | True |
接受管道输入: | False |
接受通配符: | False |
-Destination
指定向下部署的根证书文件路径。
类型: | String |
Position: | 5 |
默认值: | None |
必需: | True |
接受管道输入: | False |
接受通配符: | False |
-EndpointUrl
指定用于对 CI 策略进行签名的 Azure CodeSigning 终结点。 它是 URL,格式为 https://xxx.codesigning.azure.net
类型: | String |
Position: | 3 |
默认值: | None |
必需: | True |
接受管道输入: | False |
接受通配符: | False |
-MetadataFilePath
指定用于对 CI 策略进行签名的 Azure CodeSigning 元数据文件路径。 它是文件路径,元数据内容如下所示。 文件内容示例: { “Endpoint”: “https://xxx.codesigning.azure.net/", ”CodeSigningAccountName“: ”acstest“, ”CertificateProfileName“: ”acstestCert1“ }
类型: | String |
Position: | 1 |
默认值: | None |
必需: | True |
接受管道输入: | False |
接受通配符: | False |
-ProfileName
指定用于对 CI 策略进行签名的 Azure CodeSigning ProfileName。
类型: | String |
Position: | 2 |
默认值: | None |
必需: | True |
接受管道输入: | False |
接受通配符: | False |
输入
Azure CodeSigning AccountName
Azure CodeSigning Profile Name
Azure CodeSigning Signing EndpointUrl
Azure CodeSigning UnSigned CI Policy File Path
Azure CodeSigning Signed CI Policy File Path Destination
输出
Signed CI Policy file