Skip to content

Test‑CertificatePrivateKeyCriticalBinding

raandree edited this page Sep 6, 2026 · 1 revision

SYNOPSIS

Reports the critical service bindings that use a certificate's private key.

SYNTAX

Test-CertificatePrivateKeyCriticalBinding [-Certificate] <X509Certificate2>
 [<CommonParameters>]

DESCRIPTION

Enumerates every certificate currently bound to an HTTP.sys TLS endpoint, a WinRM HTTPS listener, a Remote Desktop listener, or eligible for Active Directory LDAPS, and reports the bindings whose certificate shares a private key with the supplied certificate.

The comparison is by public key, not by thumbprint, because a renewal that reuses the key produces a second certificate over the same private key. The private-key mutation commands refuse to write while any binding is reported, so this command explains a refusal without changing state.

EXAMPLES

EXAMPLE 1

$certificate = Get-Item 'Cert:\LocalMachine\My\0123456789ABCDEF'
Test-CertificatePrivateKeyCriticalBinding -Certificate $certificate

Reports every critical binding that currently uses the same private key.

PARAMETERS

-Certificate

The certificate whose private key is inspected.

Type: X509Certificate2
Parameter Sets: (All)
Aliases:

Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

System.Security.Cryptography.X509Certificates.X509Certificate2

OUTPUTS

WindowsAccessControl.CertificateCriticalBinding

NOTES

RELATED LINKS

Home

Commands

DSC resources

Clone this wiki locally