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) {