Powershell导入Cert证书
我们导入Windows服务证书一般使用双击方式按照向导导入和MMC导入,今天我们介绍通过Powershell导入Cert证书,具体见下:
- 将证书导入本当前用户的受信任颁发机构中
Import-Certificate -FilePath "d:\mycert.cer" -CertStoreLocation cert:\CurrentUser\Root
- 将证书导入本当前用户的个人证书中
Import-Certificate -FilePath "d:\mycert.cer" -CertStoreLocation cert:\CurrentUser\My
- 将证书导入本地计算机的受信任颁发机构中
Import-Certificate -FilePath "d:\mycert.cer" -CertStoreLocation Cert:\LocalMachine\Root
- 将证书导入本地计算机的的个人证书中
Import-Certificate -FilePath "d:\mycert.cer" -CertStoreLocation Cert:\LocalMachine\My