From 45e807d0a78add988c4b2d3821aa710433b9b3a0 Mon Sep 17 00:00:00 2001 From: jgaunt Date: Wed, 12 Aug 2020 13:19:38 -0400 Subject: [PATCH] Update 'csr.ps1' --- csr.ps1 | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/csr.ps1 b/csr.ps1 index a587142..ba3908a 100644 --- a/csr.ps1 +++ b/csr.ps1 @@ -1,6 +1,7 @@ param( $rsa, + $domain, $hostnames ) @@ -16,7 +17,13 @@ if ($hostnames -eq $null) { $hostnames = read-host "Please enter Hostnames, no domain, to generate CSRs for" } -$domain = "home.johnhgaunt.com" +if ($domain -eq $null) { + $domain = read-host "Please enter the domain (home|mgmt) to generate CSRs for [home]" + if ([string]::IsNullOrWhiteSpace($domain)){ + $domain = "home" + } + $domain = "$domain.johnhgaunt.com" +} foreach ($hostname in $hostnames) {