Updated to make the server a parameter

This commit is contained in:
2024-11-12 14:02:01 +00:00
parent fd98be8eb2
commit 63a2fd5b9a

View File

@@ -9,7 +9,8 @@ param(
[string]$domain = "home.johnhgaunt.com",
[System.IO.FileInfo]$Path = [Environment]::GetFolderPath("Desktop"),
[ValidateSet("RSA2048", "RSA4096","ECC-256", "ECC-384")]
[string]$algorithm = "ECC-384"
[string]$algorithm = "ECC-384",
[string]$server = "gauntonlineca.home.johnhgaunt.com\GauntOnlineCA-CA"
)
begin {
@@ -89,7 +90,7 @@ DNS.2 = $hostname"
-Wait
Start-Process certreq.exe `
-ArgumentList "-submit -config `"gauntonlineca.home.johnhgaunt.com\GauntOnlineCA-CA`" -attrib `"$certReqAttrib`" `"$csrFile`" `"$crtFile`"" `
-ArgumentList "-submit -config `"$server`" -attrib `"$certReqAttrib`" `"$csrFile`" `"$crtFile`"" `
-Wait
# add the sub CA to the end of the cert