To generate a CSR (Certificate Signing Request) on an IIS Server without using the Windows graphical interface (GUI), follow the steps below.
A CSR is an encrypted request that contains information about your domain and organization and is used for issuing an SSL certificate.
Make sure that:
Important: When a CSR is generated, the corresponding Private Key is automatically created as well. For the SSL certificate to be installed successfully, it must be installed on the same server where the CSR was generated.
Open a text editor (Notepad) and paste the following content:
;--- request.inf ---
[Version]
Signature="$Windows NT$"
[NewRequest]
Subject = "CN=www.papaki.com, OU=papaki.com, O=papaki.com, L=Heraklion, S=Crete, C=GR, E=support@papaki.com"
; Key Exchange - for encryption
KeySpec = 1
; 2048 bits minimum, 3072 or 4096 are valid too
KeyLength = 4096
; Needed if you need to export the certificate to another server
Exportable = TRUE
; Indicates a server certificate, not a user certificate
MachineKeySet = TRUE
SMIME = False
UserProtected = FALSE
; Generate a new private key
UseExistingKeySet = FALSE
; RSA key
ProviderName = "Microsoft RSA SChannel Cryptographic Provider"
HashAlgorithm = SHA256
ProviderType = 12
; Standard of CSR's
RequestType = PKCS10
; Digital signatures and encryption
KeyUsage = 0xa0
Silent = True
FriendlyName = "Certificate SHA-256"
[EnhancedKeyUsageExtension]
; Server authentication
OID=1.3.6.1.5.5.7.3.1
;------------------------------
Modify the following line:
Subject = "CN=www.papaki.com, OU=papaki.com, O=papaki.com, L=Heraklion, S=Crete, C=GR, E=support@papaki.com"
with your own details.
| Field | Description |
|---|---|
| CN (Common Name) | The domain name that will be secured by the SSL certificate |
| OU (Organizational Unit) | Department name (optional) |
| O (Organization) | Company or organization name |
| L (Locality) | City |
| S (State / Province) | State, county, or region |
| C (Country) | Two-letter ISO country code (e.g. GR, US, UK) |
| E (Email Address) | A valid email address |
For an SSL certificate protecting: www.example.com > CN=www.example.com
For an SSL certificate protecting: example.com > CN=example.com
For a Wildcard SSL certificate > CN=*.example.com
For most DV SSL certificates, the most important field is the Common Name, as it determines which domain will be secured by the certificate.
The value: KeyLength = 4096
provides an increased level of security.
Alternatively, you may use: KeyLength = 2048
which remains fully accepted by most Certificate Authorities.

in the Windows search box.
Run the following commands:
cd C:\
certreq -new request.inf request.csr

If the process completes successfully, a new file named: request.csr
will be created in: C:\

Open the file: request.csr
using Notepad or any text editor.
Copy the entire contents of the file, including the lines:
-----BEGIN CERTIFICATE REQUEST-----
and
-----END CERTIFICATE REQUEST-----
This content will be required during the issuance or reissuance of your SSL certificate.
When the CSR is generated, the corresponding Private Key is also created and stored on the server.
Do not:
If the Private Key is lost, you will need to generate a new CSR and request a reissue of the SSL certificate.
Once the process is complete:
Contact our experts, they will be happy to help!
Contact us