11.05.2025

Windows Certificates: how to view and how it works?

Modern network interactions require security, especially when transferring confidential data.In open networks such as the Internet, information can easily be intercepted. Standard encryption methods based on symmetric keys require secure key exchange, which is impossible in open channels.

The solution was asymmetric cryptography.: it uses a pair of keys — public and private. The private key is kept only by the owner, and the public key can be distributed openly. However, if everyone can create a "public key", how can we make sure that it belongs to the right owner?

This is where certificates come in: they associate a public key with verified information about the owner, whether it's a website, an organization, or a user.

What are certificates and how do they work?

A certificate is a file that contains information about the owner and his public key. In order to avoid substitution, this file is signed by a certification authority. In this case, the recipient already trusts the keys of this center and will confirm the authenticity of the certificate used by the sender. The most common certificate format is X.509. It includes:

Screenshot № 1 — Attributes of certificate

  1. public key certificate;
  2. owner's Name (Common Name, CN);
  3. Validity period;
  4. digital signature of the certifying center;
  5. extensions (for example, alternative names, usage policy, etc.).

Also in Windows, certificates are presented as files with extensions:

Screenshot № 2 — File formats

How do I view and install certificates in Windows?

There are several certificate repositories in Windows:

Which can be viewed using Windows snap-ins via the search. Press Win + R, type mmc, and press Enter. In the menu, select File → Add/Remove Snap-in. Add Certificates, select for the current user or for the computer.

Screenshot № 3 — List pf certificates

You can now view and manage certificates in various repositories. They can also be viewed through commands. To do this, open PowerShell: Win+X -> Terminal/Powershell:

Get-ChildItem Cert:\CurrentUser\My
Get-ChildItem Cert:\LocalMachine\Root

To install the certificates, double-click on the .crt or .pfx file. Follow the installation wizard: specify which storage to place the certificate in.

Screenshot № 4 — New certificate

You can also install certificates via PowerShell, if you have the .crt format, then use the following line:

Import-Certificate -FilePath "C:\path\to\cert.crt" -CertStoreLocation "Cert:\LocalMachine\Root"

Other commands are provided for the .pfx format:

$password =ConvertTo-SecureString -String "password" -Force -AsPlainText
Import-PfxCertificate -FilePath "C:\path\cert.pfx" -Password $password -CertStoreLocation "Cert:\LocalMachine\My"

How do I create a self-signed certificate?

The self-signed certificate is used in test and internal environments. It is created without the participation of a certification authority:

New-SelfSignedCertificate `
-DnsName "test.local" `
-CertStoreLocation "Cert:\LocalMachine\My" `
-FriendlyName "My Self-Signed Cert" `
-NotAfter (Get-Date).AddYears(1)

The use of certificates is the basis of trusted communications on the Internet and corporate networks. The ability to create and manage them is important for both administrators and developers.