Black Friday Special! Get 30% off Training Subscriptions with code BLACKFRIDAY30 at checkout!

PowerShell PKI Module Documentation

Documentation Home
This command is not available in non-domain environments
This command requires installed Remote Server Administration Tools (RSAT)

Get-CertificateTemplate

Synopsis

Retrieves registered certificate templates from Active Directory.

Syntax

Get-CertificateTemplate [-Name <String[]>] [<CommonParameters>]

Get-CertificateTemplate [-DisplayName <String[]>] [<CommonParameters>]

Get-CertificateTemplate [-OID <String[]>] [<CommonParameters>]

Description

Retrieves registered certificate templates from Active Directory.

Parameters

-Name <String[]>

Specifies common name of a template to retrieve. You can specify multiple template names by separating them with comma character (,).

Note: this parameter don't accept wildcards

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

-DisplayName <String[]>

Specifies display name of a template to get. You can specify multiple display names by separating them with comma character (,).

Note: this parameter don't accept wildcards

Required? False
Position? named
Default value *
Accept pipeline input? false
Accept wildcard characters? False

-OID <String[]>

Specifies object identifier (OID) of a template to get. You can specify multiple template OIDs by separating them with comma character (,).

Note: this parameter don't accept wildcards

Required? False
Position? named
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

None.

Outputs

PKI.CertificateTemplates.CertificateTemplate

Notes

Examples

Example 1

PS C:\> Get-CertificateTemplate

Retrieves all registered certificate templates from Active Directory.

Example 2

PS C:\> Get-CertificateTemplate -DisplayName Computer

Retrieves only certificate template with display name 'Computer'.

Example 3

PS C:\> Get-CertificateTemplate -Name WebServer, CrossCA

Retrieves certificate templates with common names 'WebServer' (Web Server) and 'CrossCA' (Cross Certification Authority).

Example 4

PS C:\> Get-CertificateTemplate -OID 1.3.6.1.4.1.311.21.8.149510.7314491.15746959.9320746.3700693.37.1.14

Retrieves certificate template that has assigned OID = 1.3.6.1.4.1.311.21.8.149510.7314491.15746959.9320746.3700693.37.1.14 (default Machine/Computer template).

Related links

Remove-CertificateTemplate

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