Create Certificate from CA

Aus Wiki-WebPerfect
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