Below is the issue faced by one my client last week that they are not able to provide the certificates with more than 5 years validity even though certificate template is issued with 5 Years.
![1](https://static.wixstatic.com/media/0a0d80_43ed9cda902043c3a42e80bf4cec9126~mv2.png/v1/fill/w_103,h_133,al_c,q_85,usm_0.66_1.00_0.01,blur_2,enc_auto/0a0d80_43ed9cda902043c3a42e80bf4cec9126~mv2.png)
Above Template shows that certificate Validity period 5 Years but when it is issues the certificate provides the certificate validity only for 3 years.
![2](https://static.wixstatic.com/media/0a0d80_ba965b3fce0b4b69aa26389629f7af82~mv2.png/v1/fill/w_64,h_47,al_c,q_85,usm_0.66_1.00_0.01,blur_2,enc_auto/0a0d80_ba965b3fce0b4b69aa26389629f7af82~mv2.png)
![3](https://static.wixstatic.com/media/0a0d80_95c5f329bc4d41b7ab2fa1becd3e822c~mv2.png/v1/fill/w_68,h_3,al_c,q_85,usm_0.66_1.00_0.01,blur_2,enc_auto/0a0d80_95c5f329bc4d41b7ab2fa1becd3e822c~mv2.png)
When we run the Certutil command
certutil -getreg ca\validityperiodunits
![4](https://static.wixstatic.com/media/0a0d80_e7df38ee83534a4982a7ff6e03bb050a~mv2.png/v1/fill/w_66,h_10,al_c,q_85,usm_0.66_1.00_0.01,blur_2,enc_auto/0a0d80_e7df38ee83534a4982a7ff6e03bb050a~mv2.png)
There is a problem. it is allowed only for three years in the registry level. Hence run the below commands to set it to 5 years.s Before running the commands ensure backup has been sucessfully taken both CA and Registry.
certutil-setreg ca\ValidityPeriodUnits 5
![5](https://static.wixstatic.com/media/0a0d80_4863b23dcce644f0aca9aea115730c6a~mv2.png/v1/fill/w_68,h_15,al_c,q_85,usm_0.66_1.00_0.01,blur_2,enc_auto/0a0d80_4863b23dcce644f0aca9aea115730c6a~mv2.png)
Restart the CA services by running below commands
net stop certsvc
net start certsvc
![6](https://static.wixstatic.com/media/0a0d80_9c4af38272594c47a7552c1cd499ceaf~mv2.png/v1/fill/w_68,h_54,al_c,q_85,usm_0.66_1.00_0.01,blur_2,enc_auto/0a0d80_9c4af38272594c47a7552c1cd499ceaf~mv2.png)
Now you will see the certificates are getting issued with 5 Years without any issues.