0

In order to request a User ceritificate I'm using the script provided by the Powershell gallery https://www.powershellgallery.com/packages/Request-Certificate/1.5.0/Content/Request-Certificate.ps1

To execute this script I'm using the following command:

. "C:\Certificates\RequestCertificate.ps1" -CN "User Common Name"  -TemplateName "User" -CAName "domain\CAserver" -Export 

However when I run this command here is the output: enter image description here

After this output I get a popup message with the following information:

Machine context template conflicts with user context.

If I click ok, the request is concludes successfully. However I'm trying to automate this process. Is there a way to ignore the popup window?

I already looked at the question How to suppress a popup window while using certreq to request a certificate from an enterprise CA? (How to suppress a popup window while using certreq to request a certificate from an enterprise CA?). However the solution for the problem described was to run the script as Admin or System because the certificate generated was for the Machine and not for the User.

Does anyone know why this is happening?

Thank you in advance

Sam
  • 247
  • 5
  • 16
  • Per that link you've posted, it's a vague explanation but it points out the issue. The answers posted below that may be of use to you as well. – Abraham Zinala Aug 25 '22 at 14:52
  • The difference between the questions is that I'm trying to request a User certificate instead of a Machine. From what I understood if you want to request a certificate Machine you need to run the script as SYSTEM or Administrator. In my case I'm already running the script with my user. – Sam Aug 25 '22 at 14:57
  • Okay, what about the last answer on that post? [This do anything for you](https://stackoverflow.com/a/72345500/14903754)? – Abraham Zinala Aug 25 '22 at 15:02
  • 1
    Already tried :/ I continue with the same issue – Sam Aug 25 '22 at 15:16

0 Answers0