From 63a2fd5b9ac1e7d96a9a682f0d3a8d18478638bf Mon Sep 17 00:00:00 2001 From: John Gaunt Date: Tue, 12 Nov 2024 14:02:01 +0000 Subject: [PATCH] Updated to make the server a parameter --- csr.ps1 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/csr.ps1 b/csr.ps1 index a6829a3..f81c0d8 100644 --- a/csr.ps1 +++ b/csr.ps1 @@ -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