If you want to issue a certificate with 20 years expiration, run this commands:
certutil -setreg ca\ValidityPeriodUnits 20 certutil -setreg ca\ValidityPeriod "Years" net stop certsvc net start certsvc
To issues a certificate with a template, run this command
certreq -submit -attrib "CertificateTemplate:CertificateTemplateName" CSRfile.csr