Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents
typeflat

Prerequisites

  • Ensure the signed certificate files is on or accessible by the system that created the original certificate request

Install the certificate request 

...

  1. Sign in to the computer where the certificate was originally requested then start an administrative PowerShell session

Info

Complete any remaining instructions in this PowerShell session unless directed otherwise

  1. Run the following commands to define

...

  1. the certificate to be imported: 

    Code Block
    languagepowershell
    $Path = Read-Host -Prompt "Provide the path to the certificate file"
    $Name = Read-Host -Prompt "Provide the name of the certificate file"
  2. Run the following commands to retrieve the certificate to be imported:

    Code Block
    languagepowershell
    $CertificateFilePath = Get-ChildItem -Path $Path | Where-Object { $_.Name -Match $Name } | Sort-Object -Property LastWriteTime | Select-Object -Last 1 -ExpandProperty FullName
  3. Run the following commands to

...

  1. verify the certificate to be imported

    Code Block

...

  1. languagepowershell
    $CertificateFromFile = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2($CertificateFilePath)
    $CertificateFromFile | Select-Object -Properties Thumbprint, HasPrivateKey, NotBefore, NotAfter, Subject, Issuer
  2. Run the following commands to define the certificate store:

    Code Block
    languagepowershell
    $CertStoreLocation = 'Cert:\LocalMachine\My'
  3. Run the following commands to import the certificate: 

    Code Block
    languagepowershell
    $CertificateObject = Import-Certificate -FilePath

...

  1.  $CertificateFilePath -CertStoreLocation $CertStoreLocation
    $CertificateObject | Select-Object -Properties Thumbprint, HasPrivateKey, NotBefore, NotAfter, Subject, Issuer