首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >证书未在certmgr中显示

证书未在certmgr中显示
EN

Server Fault用户
提问于 2018-01-26 20:14:37
回答 1查看 1.3K关注 0票数 1

通过powershell证书:\LocalMachine\My证书存储区,我确实看到了证书,但是通过证书管理器certmgr.msc,我看不到它的任何地方。如何使它出现在那里或在IIS服务器证书部分。证书是使用下面的脚本导入的。

代码语言:javascript
复制
# Install a secret stored in KeyVault into an Azure VM's credential store.
$resourceGroup = [resource group name]
$vm = Get-AzureRmVM -ResourceGroupName $resourceGroup -Name [VM name]
$vaultId = "/subscriptions/[subscription guid]/resourceGroups/$resourceGroup/providers/Microsoft.KeyVault/vaults/[vault name]"
$certStore = "My"
$certUrl = [KeyVault secret URL w/ version id]
$vm = Add-AzureRmVMSecret -VM $vm -SourceVaultId $vaultId -CertificateStore $certStore -CertificateUrl $certUrl

# Update the VM so the changes take effect.
Update-AzureRmVM -ResourceGroupName $resourceGroup -VM $vm
EN

回答 1

Server Fault用户

发布于 2018-01-26 21:25:14

这些步骤看起来不错,问题是如何生成证书。尝试在本地机器上生成一个自签名证书,然后上传到保险库进行测试。

代码语言:javascript
复制
#Generating self-singed certificate 
$Cert = New-SelfSignedCertificate -Subject "CN=Disk Encryption Cert"  -CertStoreLocation "cert:\LocalMachine\My" -FriendlyName "Disk Encryption Cert" -NotAfter (Get-Date).AddYears(10) -KeyAlgorithm RSA -KeyLength 2048 -Type Custom -KeySpec Signature
Export-PfxCertificate -Cert $cert -Password (ConvertTo-SecureString "Testing123" -AsPlainText -Force) -FilePath .\Diskencrypt.pfx -Force
票数 0
EN
页面原文内容由Server Fault提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://serverfault.com/questions/894332

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档