Auto Light Dark
Auto Light Dark

Appendices

References

Title

Description

Document/Link

Obtain certificates for HGS

Certificate properties & configuration

Obtain certificates for HGS | Microsoft Learn

References


Command Summary (CLI commands used)

Command

Purpose

cngtool listkeys

Verifies the Utimaco CNG connection and lists keys available in the configured CryptoServer key store.

Install-WindowsFeature HostGuardianServiceRole -IncludeManagementTools -Restart

Installs the Host Guardian Service role and management tools and restarts the server.

Get-WindowsFeature HostGuardianServiceRole

Verifies that the Host Guardian Service role is installed.

Install-HgsServer -HgsDomainName '<HGS_Domain_Name>' -Restart

Creates and configures the dedicated HGS forest using the specified domain name.

Get-CimInstance Win32_ComputerSystem | Select-Object Domain,PartOfDomain

Verifies that the HGS server is associated with the configured HGS domain.

Install-WindowsFeature ADCS-Cert-Authority -IncludeManagementTools

Installs the AD CS Certification Authority role and management tools used in the example CA configuration.

Install-AdcsCertificationAuthority ...

Configures the Enterprise Root CA used in the example to issue the HGS signing and encryption certificates.

Get-Service CertSvc

Verifies that Active Directory Certificate Services is running.

certtmpl.msc

Opens the Certificate Templates console.

certsrv.msc

Opens the Certification Authority console.

notepad C:\HGSencryption.inf

Creates/opens the INF configuration file for the HGS encryption certificate request.

notepad C:\HGSsigning.inf

Creates/opens the INF configuration file for the HGS signing certificate request.

certreq -new C:\HGSencryption.inf C:\HGSencryption.req

Generates the HGS encryption certificate request and associated Utimaco KSP private key.

certreq -new C:\HGSsigning.inf C:\HGSsigning.req

Generates the HGS signing certificate request and associated Utimaco KSP private key.

certreq -submit -config ".\<CA_Name>" C:\HGSencryption.req C:\HGSencryption.cer

Submits the HGS encryption certificate request to the configured CA.

certreq -accept C:\HGSencryption.cer

Installs the issued HGS encryption certificate and associates it with its private key.

certreq -submit -config ".\<CA_Name>" C:\HGSsigning.req C:\HGSsigning.cer

Submits the HGS signing certificate request to the configured CA.

certreq -accept C:\HGSsigning.cer

Installs the issued HGS signing certificate and associates it with its private key.

$Certs = Get-ChildItem Cert:\LocalMachine\My | Where-Object {$_.Subject -like "CN=HGS*"}

Retrieves the installed HGS certificates from the Local Machine certificate store.

$Certs | Select-Object Subject, Thumbprint

Displays the HGS certificate subjects and thumbprints.

$signing = ($Certs | Where-Object Subject -like '*HGSsigning*').Thumbprint

Stores the signing certificate thumbprint based on the certificate subject for HGS initialization.

$encryption = ($Certs | Where-Object Subject -like '*HGSencryption*').Thumbprint

Stores the encryption certificate thumbprint based on the certificate subject for HGS initialization.

Initialize-HgsServer -HgsServiceName tpmHGS -SigningCertificateThumbprint $signing -EncryptionCertificateThumbprint $encryption -TrustTpm

Initializes HGS using the configured signing and encryption certificates with TPM-trusted attestation mode.

certlm.msc

Opens the Local Machine certificate store to configure private-key permissions for the HGS service account.

certutil -store my HGSencryption.relecloud.com

Verifies the HGS encryption certificate, its private key, and associated KSP.

certutil -store my HGSsigning.relecloud.com

Verifies the HGS signing certificate, its private key, and associated KSP.

Get-HgsTrace -RunDiagnostics

Runs HGS diagnostics to validate HGS configuration and access to the configured certificates/private keys.