Create Certificate from CA

Aus Wiki-WebPerfect
Version vom 9. März 2021, 16:46 Uhr von Admin (Diskussion | Beiträge)

(Unterschied) ← Nächstältere Version | Aktuelle Version (Unterschied) | Nächstjüngere Version → (Unterschied)
Wechseln zu: Navigation, Suche
#Check which template is Available on the CA
certutil -Template | Select-String <SearchString>
 
#Create/get a certificate from CA
$TemplateName = "<Template>"
$SubjectDNS = "<CNAME_or_Alias_of_the_Webservice>"
$SanEntries = $SubjectDNS,"<FQDN_or_other_SAN_entries>"
$Cert = Get-Certificate -SubjectName "CN=$SubjectDNS,O=<Your_Company>,L=<Company_Location>,S=<Company_Location>,C=CH" -DnsName $SanEntries -Template $TemplateName -CertStoreLocation Cert:\LocalMachine\My