Skip to content

Commit 57e47c6

Browse files
authored
update to get SANs working correcty
old version placed [Extensions] and first line of SAN on previous line due to '@ not being on beginning of line and so the requests.inf didn't get created properly **also added Write-Debug $file to help me diagnose this issue.
1 parent 9bed9a9 commit 57e47c6

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Request-Certificate.ps1

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,8 @@ CertificateTemplate = "$TemplateName"
251251

252252
Write-Verbose "A value for the SAN is specified. Requesting a SAN certificate."
253253
Write-Debug "Add Extension for SAN to the inf file..."
254-
$file += @'
254+
$file +=
255+
@'
255256
256257
[Extensions]
257258
; If your client operating system is Windows Server 2008, Windows Server 2008 R2, Windows Vista, or Windows 7
@@ -278,6 +279,9 @@ CertificateTemplate = "$TemplateName"
278279
$rsp = Join-Path -Path $env:TEMP -ChildPath "$CN.rsp"
279280

280281
Remove-ReqTempfiles -tempfiles $inf, $req, $cer, $rsp
282+
283+
#write the file to debug logs (if debug enabled)
284+
Write-Debug $file
281285
#create new request inf file
282286
Set-Content -Path $inf -Value $file
283287

0 commit comments

Comments
 (0)