How to do it...

  1. Install ADCS features on the root computer:
      Install-WindowsFeature -Name ADCS-Cert-Authority `                             -IncludeManagementTools
  1. Create CA policy file:
      $CaInf = @"
       [Version]
       Signature="$Windows NT$"
       [Certsrv_Server]
       RenewalKeyLength=4096
       RenewalValidityPeriod=Years
       RenewalValidityPeriodUnits=20
       CRLPeriod=Weeks
       CRLPeriodUnits=26
       CRLDeltaPeriod=Days
       CRLDeltaPeriodUnits=0
       LoadDefaultTemplates=0
       AlternateSignatureAlgorithm=1
      "@
      $PathInf = Join-Path -Path $Env:SystemRoot `                           -ChildPath 'capolicy.inf'
      $CaInf | Out-File -FilePath $PathInf
  1. Install a CertificateAuthority based on the capolicy.inf file you created in step 2:
      Install-AdcsCertificationAuthority -CAType StandaloneRootCA `
      -KeyLength 4096 -HashAlgorithmName SHA256 ...

Get Windows Server 2016 Automation with PowerShell Cookbook - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.