21 lines
1.3 KiB
PowerShell
21 lines
1.3 KiB
PowerShell
$ErrorActionPreference='SilentlyContinue'
|
|
"== CA service + identity =="
|
|
Get-Service CertSvc | Select-Object Name,Status,StartType | Format-Table -Auto | Out-String
|
|
certutil -cainfo 2>&1 | Select-String 'CA name|CA type|Subject|Expires|Provider|hash' | Out-String
|
|
"== CA database + log files (backup sizing) =="
|
|
Get-ChildItem 'C:\Windows\System32\CertLog' -File 2>$null | Select-Object Name,@{n='MB';e={[math]::Round($_.Length/1MB,2)}} | Format-Table -Auto | Out-String
|
|
"== Private-key provider / exportability (determines backupKey method) =="
|
|
certutil -store My 2>&1 | Select-String 'TPS-TPS-SERVER-CA|Provider =|Private key is NOT exportable|Signature test|Key Container' | Out-String
|
|
"== Config to reproduce on the rebuilt CA =="
|
|
"-- Validity period --"
|
|
certutil -getreg CA\ValidityPeriodUnits 2>&1 | Select-String 'Values|=' | Out-String
|
|
certutil -getreg CA\ValidityPeriod 2>&1 | Select-String 'Values|=' | Out-String
|
|
"-- CRL publication URLs --"
|
|
certutil -getreg CA\CRLPublicationURLs 2>&1 | Out-String
|
|
"-- AIA publication URLs --"
|
|
certutil -getreg CA\CACertPublicationURLs 2>&1 | Out-String
|
|
"-- CRL period --"
|
|
certutil -getreg CA\CRLPeriodUnits 2>&1 | Select-String 'Values|=' | Out-String
|
|
certutil -getreg CA\CRLPeriod 2>&1 | Select-String 'Values|=' | Out-String
|
|
"== DONE =="
|