Skip to content

Commit 25d984f

Browse files
author
Tajo Fittkau
committed
Add KeyLength parameter.
1 parent d224480 commit 25d984f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Request-Certificate.ps1

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,9 @@ Param(
158158
[Parameter(Mandatory = $False, ValueFromPipelineByPropertyName = $True)]
159159
[String]$TemplateName = "WebServer",
160160
[Parameter(Mandatory = $False, ValueFromPipelineByPropertyName = $True)]
161+
[ValidateSet(1024,2048,3072,4096,15360)]
162+
[int]$keyLength = 2048,
163+
[Parameter(Mandatory = $False, ValueFromPipelineByPropertyName = $True)]
161164
[string]$CAName,
162165
[Parameter(Mandatory = $False, ValueFromPipelineByPropertyName = $True)]
163166
[switch]$Export,
@@ -212,7 +215,7 @@ PROCESS {
212215
[NewRequest]
213216
Subject = "CN=$CN,c=$Country, s=$State, l=$City, o=$Organisation, ou=$Department"
214217
MachineKeySet = TRUE
215-
KeyLength = 2048
218+
KeyLength = $KeyLength
216219
KeySpec=1
217220
Exportable = TRUE
218221
RequestType = PKCS10

0 commit comments

Comments
 (0)