PowerShell PKI Module Documentation

Documentation Home

Get-CertificateRevocationList

Synopsis

Retrieves Certificate Revocation List object from a file or a DER-encoded byte array.

Syntax

Get-CertificateRevocationList [-Path] <String> [<CommonParameters>]

Get-CertificateRevocationList [-RawCRL] <Byte[]> [<CommonParameters>]

Description

Retrieves an X.509 Certificate Revocation List (CRL) object from a file or a DER-encoded byte array.

Certificate Revocation List (CRL) is a digitally signed file issued by a Certification Authority (CA) that contains serial numbers of certificates that are explicitly revoked (must not be accepted by applications) before specified certificate expiration. Client application uses CRL file during presented certificate validation to determine whether it is valid for usage. If the certificate (its serial number) is presented in the CRL, application must reject presented certificate.

Parameters

-Path <String>

Specifies the path to a file.

Required? True
Position? 0
Default value
Accept pipeline input? true (ByValue)
Accept wildcard characters? False

-RawCRL <Byte[]>

Specifies a DER-encoded byte array that represents a Certificate Revocation List (CRL).

Required? True
Position? 0
Default value
Accept pipeline input? false
Accept wildcard characters? False

<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, InformationAction, InformationVariable,
WarningAction, WarningVariable, OutBuffer, PipelineVariable and OutVariable.
For more information, see about_CommonParameters (https://go.microsoft.com/fwlink/?LinkID=113216).

Inputs

System.String


System.Byte[]

Outputs

SysadminsLV.PKI.Cryptography.X509Certificates.X509CRL2

Notes

Examples

Example 1

PS C:\> Get-CRL C:\Custom.crl

In this example, the CRL object is constructed from a CRL file.

Example 2

PS C:\> $Raw = [IO.FILE]::ReadAllBytes("C:\Custom.crl")
PS C:\> Get-CRL -RawCRL $Raw

Returns X509CRL2 object from a DER-encoded byte array.

Related links

Show-CertificateRevocationList

Minimum PowerShell version support

  • Windows PowerShell 3.0

Operating System Support

  • Windows 7
  • Windows 8
  • Windows 8.1
  • Windows 10
  • Windows 11
  • Windows Server 2008 R2 all editions
  • Windows Server 2012 all editions
  • Windows Server 2012 R2 all editions
  • Windows Server 2016 all editions
  • Windows Server 2019 all editions
  • Windows Server 2022 all editions