I need to request a certificate via command line I have investigated that certreq is the tool that can request the certificate.
I am used to the gui to request the certificate by selecting one of the available templates, but I need to do the same via command line.
Any ideas about how to achieve this?
If you want to display a list (in the command line) of certificate templates that are on offer by your friendly Active Directory Certificate Services CA, use
certutil -CATemplates
.Bonus, it also tells you whether you currently have the right to enroll for each particular template.
To enroll in one of the certificate templates, use:
The
-q
parameter suppresses all interactive dialog boxes, making it a purely command-line-only experience.Use the below command to list templates and their details:
Reference: https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/certutil