Root CA Setup
VM Information
Section titled “VM Information”| Setting | Value |
|---|---|
| VM ID | 310 |
| Hostname | srv-rca-zrh-01 |
| IP | 10.30.30.20 |
| OS | Windows Server 2025 |
| Domain | WORKGROUP (not domain-joined!) |
| Start at boot | NO |
Network Configuration
Section titled “Network Configuration”New-NetIPAddress -InterfaceAlias "Ethernet" -IPAddress 10.30.30.20 -PrefixLength 24 -DefaultGateway 10.30.30.1Set-DnsClientServerAddress -InterfaceAlias "Ethernet" -ServerAddresses 10.30.30.15Rename-Computer -NewName "srv-rca-zrh-01" -RestartCAPolicy.inf
Section titled “CAPolicy.inf”Create C:\Windows\CAPolicy.inf BEFORE installing AD CS:
[Version]Signature="$Windows NT$"
[Certsrv_Server]RenewalKeyLength=4096RenewalValidityPeriod=YearsRenewalValidityPeriodUnits=20CRLPeriod=WeeksCRLPeriodUnits=52CRLDeltaPeriod=DaysCRLDeltaPeriodUnits=0LoadDefaultTemplates=0
[CRLDistributionPoint]URL=http://pki.microsoftlab.ch/crl/%3.crl
[AuthorityInformationAccess]URL=http://pki.microsoftlab.ch/aia/%3.crtCAPolicy.inf Variables
Section titled “CAPolicy.inf Variables”| Variable | Description | Result |
|---|---|---|
| %3 | CA Name | MicrosoftLab Root CA 01 |
Resulting URLs
Section titled “Resulting URLs”CRL: http://pki.microsoftlab.ch/crl/MicrosoftLab Root CA 01.crlAIA: http://pki.microsoftlab.ch/aia/MicrosoftLab Root CA 01.crtAD CS Installation
Section titled “AD CS Installation”# Install roleInstall-WindowsFeature AD-Certificate -IncludeManagementTools
# Configure Root CAInstall-AdcsCertificationAuthority ` -CAType StandaloneRootCA ` -CACommonName "MicrosoftLab Root CA 01" ` -KeyLength 4096 ` -HashAlgorithmName SHA256 ` -CryptoProviderName "RSA#Microsoft Software Key Storage Provider" ` -ValidityPeriod Years ` -ValidityPeriodUnits 20 ` -ForceExport Root Certificate and CRL
Section titled “Export Root Certificate and CRL”# Create export folderNew-Item -Path "C:\RootCA-Export" -ItemType Directory -Force
# Copy filesCopy-Item "C:\Windows\System32\CertSrv\CertEnroll\*.crt" "C:\RootCA-Export\"Copy-Item "C:\Windows\System32\CertSrv\CertEnroll\*.crl" "C:\RootCA-Export\"
# VerifyGet-ChildItem "C:\RootCA-Export"Shutdown Root CA
Section titled “Shutdown Root CA”After exporting certificate and CRL:
Stop-Computer -ForceImportant: Root CA should remain offline. Only start for CRL renewal (annually).