![](http://2.bp.blogspot.com/-3vUHH0YMHgs/WJ3Wk6UxWvI/AAAAAAAAOJo/4HwuDYjE60wSYhURjZpfhTJ1GW5Bdw5UQCLcB/s1600/Certification-Authority-Windows-Server-2016.png)
This article will guide you through the steps to install and configure certification authority on Windows Server 2016. We will be using test.com as our active directory domain through out this guide.
Prerequisites
- Windows Server 2016 installed on (Bare-metal or Virtual Machine)
- Active Directory Domain Services
Installing Web Server
To begin with the certification authority, first you need to install web services on your Windows Server 2016 machine. Open up PowerShell and execute the following command:install-windowsfeature web-server -IncludeManagementTools
Creating DNS CNAME Record For Web Server
To create CNAME record, Open up DNS Console on your active directory domain server and provide the required information according to your environment as shown in image below.![](http://3.bp.blogspot.com/-VSyyPJz0NpM/WJ3LE_HpyMI/AAAAAAAAOIY/39XthDwPOzkw8sKqGVbEhB0bKWv0QT52gCLcB/s1600/Certification-Authority-Windows-Server-2016-1.png)
Creating Shared Folder
You need to create a shared folder where Certificate Revocation List (CRL) and Certificates from Certificate Authority (CA) will be stored.Open up PowerShell and execute the following command:
New-Item c:\cert -type directory
New-SMBShare –Name 'cert'–Path 'C:\cert' -ChangeAccess 'test\cert publishers'
Now, download NTFS Security module from here and import it using the following command.
import-module .\NTFSSecurity.psd1
You need to authorize NTFS Read permissions to Everyone and Anonymous logon using the following command.
add-NTFSAccess -Path C:\cert -Account 'ANONYMOUS LOGON' -AccessRights Read
add-NTFSAccess -Path C:\cert -Account 'Everyone' -AccessRights fullcontrol
Creating Virtual Directory
Open up IIS management console and right click on Default Web Site> Add Virtual Directory![](http://4.bp.blogspot.com/-QfkfGmXph1s/WJ3LF1ffuOI/AAAAAAAAOI0/2ipM8Gk3RE8YvKFeMXLAxBbSKrn69G7UwCLcB/s1600/Certification-Authority-Windows-Server-2016-2.png)
Provide the following information according to your environment and click OK.
![](http://1.bp.blogspot.com/-Jf2-rB7iXH0/WJ3LF2_HvMI/AAAAAAAAOIw/y85zf8KOZTsOS-uViYqcO7axa9OxXswwgCLcB/s1600/Certification-Authority-Windows-Server-2016-3.png)
Since we have added virtual directory, now on left pane of the virtual directory, double click Request Filtering
![](http://1.bp.blogspot.com/-Ec4_LFjEYLs/WJ3LGWrAgNI/AAAAAAAAOI4/UcXAMgdLHwYsXZSF48s2xzMTKnuATeoYACLcB/s1600/Certification-Authority-Windows-Server-2016-4.png)
Click Edit Feature Settings
![](http://3.bp.blogspot.com/-jcYLoCzwHqE/WJ3LGW-LjVI/AAAAAAAAOJA/WUaVPoRLOkIXut-fWVUaXNvOQcrAhA5VACLcB/s1600/Certification-Authority-Windows-Server-2016-5.png)
Check Allow double escaping and click OK
![](http://4.bp.blogspot.com/-crtI4O3ZbSQ/WJ3LGbGltcI/AAAAAAAAOI8/FjWaLatkEFI_pYBHK45kr3Pxj0zrV7vzQCLcB/s1600/Certification-Authority-Windows-Server-2016-6.png)
Configuring Certification Authority Server
Here, you need to create certificate authority policy file. Go to C:\Windows directory and create new file CAPolicy.inf![](http://3.bp.blogspot.com/-6QRpq9LDqHM/WJ3LG2-nQ3I/AAAAAAAAOJM/4U2YKaYWET0poxa7KLQ4nJoOCQ5W25iaACLcB/s1600/Certification-Authority-Windows-Server-2016-7.png)
You need to provide following information in this file.
[Version]
Signature="$Windows NT$"
[PolicyStatementExtension]
Policies=InternalPolicy
[InternalPolicy]
OID=1.2.3.4.1455.67.89.5
Notice="Legal Policy Statement"
URL=http://cert.test.com/cert/cps.txt
[Certsrv_Server]
RenewalKeyLength=2048
RenewalValidityPeriod=Years
RenewalValidityPeriodUnits=5
CRLPeriod=weeks
CRLPeriodUnits=1
LoadDefaultTemplates=0
AlternateSignatureAlgorithm=1
[CRLDistributionPoint]
[AuthorityInformationAccess]
Installing Certification Authority Role on Active Directory Domain
Open up PowerShell on your Active Directory Domain and type the following command to install CA Role.Add-WindowsFeature Adcs-Cert-Authority -IncludeManagementTools
Install-AdcsCertificationAuthority -CAType EnterpriseRootCA
Open up Certificate Authority console and click Extensions tab in Select Extensions then select CRL Distribution Point (CDP).
Delete last 3 entries:(ldap,http,file) as shown in image below.
![](http://3.bp.blogspot.com/-qakv3y2I2g4/WJ3LG7_2T2I/AAAAAAAAOJI/fXHx2WIVaD06lnaHampsoMlVa2Ivk8WLACLcB/s1600/Certification-Authority-Windows-Server-2016-8.png)
After deleting these entries click Add
![](http://2.bp.blogspot.com/-7DSeiirpPXk/WJ3LGwh88mI/AAAAAAAAOJE/Y4LswBDP9rkPJfbEtagogmrs4Mpq-jxswCLcB/s1600/Certification-Authority-Windows-Server-2016-9.png)
and enter http:\\cert.test.com\cert\
check Include in CRL and include in CDP
![](http://4.bp.blogspot.com/-QB5bgsrcaew/WJ3LE_X48cI/AAAAAAAAOIU/gAlPT0sAFzwQDbljZ6fhPADkqUxIy5ymwCLcB/s1600/Certification-Authority-Windows-Server-2016-10.png)
Now, from select extension choose Authority Information (AIA)
Authority Information (AIA) is used to publish where a copy of the issuer’s certificate may be downloaded. Paths specified in this extension can be used by an application or service to retrieve the issuing CA certificate. These CA certificates are then used to validate the certificate signature and to build a path to a trusted certificate
Again Delete ldap,http and file entries
![](http://2.bp.blogspot.com/-E0tK5Rtn3LU/WJ3LEzoDLGI/AAAAAAAAOIc/gp84RaC3vH0Jtu5_TqjY7fXHJGt5e9fWACLcB/s1600/Certification-Authority-Windows-Server-2016-11.png)
Then click add and enter http:\\cert.test.com\cert\
check Include in the AIA extension of issued certificates
![](http://3.bp.blogspot.com/-L3lbqfqARCA/WJ3LFRF4DlI/AAAAAAAAOIg/M0zkWn6SttMyxBwriBDVoNDQXW0pjh8TgCLcB/s1600/Certification-Authority-Windows-Server-2016-12.png)
All paths specified above points to network share on web server (\\web\cert) and to web virtual directory (http:\\cert.test.com)
Publishing the CRL
Its time to publish certificate to made it available to our users. Open up PowerShell and execute the following command.
certutil -crl
Copy CA Certificate and CRL to network share folder
copy C:\Windows\system32\certsrv\certenroll\*.crt \\WEB\cert
copy C:\Windows\system32\certsrv\certenroll\*.crl \\WEB\cert
![](http://4.bp.blogspot.com/-3NBIdinzYrs/WJ3LFakQ9lI/AAAAAAAAOIo/irWOr78k0AU4YjXIYsq37bwSPOPfe2WwgCLcB/s1600/Certification-Authority-Windows-Server-2016-13.png)
To check CA “health” open up PowerShell and type pkiview.msc
![](http://3.bp.blogspot.com/-TOymlYMH1Fo/WJ3LFXFLfWI/AAAAAAAAOIk/SMET7VoAegYafuvzbhJNIIgJzSHc2j_bACLcB/s1600/Certification-Authority-Windows-Server-2016-14.png)
Auto-Enrollement Certificates using GPO
On your Active Directory Domain, open up Group Policy Management Editor then Navigate to Computer Configuration> Windows Settings> Security Settings> Public Key> Certificate ServicesClient - Auto Enrollment> Configuration Model and change it toEnabled![](http://4.bp.blogspot.com/-hASdFFKOq6w/WJ3LF428vNI/AAAAAAAAOIs/AxEVI8-GgPwGPxsVWRCpSuQvWnIg06jFwCLcB/s1600/Certification-Authority-Windows-Server-2016-15.png)
We have successfully completed the deployment of certificate authority.