Identifying Certificate by “Certificate Template Name” in PowerShell

Question:

I need to use a PowerShell script to pick the certificate with “Certificate Template Name” as “Machine.” In certmgr.msc, this has “Certificate Template” with value of “Computer.” In Details, the same one has “Certificate Template Name” as “Machine.”

How can I use either of these values in a PowerShell script?

Thus far, I have:

I’ve tried just about every method that intellisense loads, but have not been able to find anything that meets my needs.

Thank You,

Answer:

Here is a solution sans-modules:

Source:

Identifying Certificate by “Certificate Template Name” in PowerShell by licensed under CC BY-SA | With most appropriate answer!

Leave a Reply