I am trying to automate the process of creating a certificate signing request and then import the response from the CA on a Windows Server 2012 R2 server to use as a certificate for SSL binding in IIS. I can create a CSR, which I then provide to the security team, which then gives me a response to the import, but I have problems importing it.
This server is in a workgroup. I think I would mention that there is no AD registration policy.
Here is my process:
- Create a CSR using certreq.exe on the appropriate server. An INF file is created that looks something like this:
[Version]
Signature = "$Windows NT$"
[NewRequest]
Subject = "C=US,S=California,L=City,O=Company,OU=IT,CN=hostname"
Exportable = TRUE
KeyLength = 2048
KeySpec = 1
KeyUsage = 0xa0
MachineKeySet = True
ProviderName = "Microsoft RSA SChannel Cryptographic Provider"
ProviderType = 12
Silent = True
SMIME = False
RequestType = PKCS10
This INF file is then converted to a CSR.req file, doing the following:
certreq.exe -new "C:\inffile.inf" "C:\certreq.req"
REQ , .CER, Digicert. , , , .
snapin MMC.

MMC, , IIS , . IIS, , , .

, script.
, .

, CSR p7b, , .
certutil -dump issuedcert.cer
certutil -dump certreq.req
: CSR . , . , , ?
certreq.exe, , .
certreq.exe -accept -machine "C:\issuedcert.cer"
, . :
