Skip to content

Commit cbbf577

Browse files
committed
(#63) Add MachineContactTimeout step param
Previously, ChocoCCM was unable to set the machine contact timeout. With this change, we add the new parameter and allow users to select a contact timeout according to their needs. Just like in the CCM UI, the value is defaulted to zero.
1 parent d2f7a5d commit cbbf577

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

src/Public/New-CCMDeploymentStep.ps1

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,13 @@ function New-CCMDeploymentStep {
1515
.PARAMETER TargetGroup
1616
The group(s) the step will target
1717
18-
.PARAMETER ExecutionTimeoutSeconds
18+
.PARAMETER ExecutionTimeout
1919
How long to wait for the step to timeout. Defaults to 14400 (4 hours)
2020
21+
.PARAMETER MachineContactTimeout
22+
How long to wait for computers to check in to start the deployment before timing out.
23+
Defaults to 0 (no timeout).
24+
2125
.PARAMETER FailOnError
2226
Fail the step if there is an error. Defaults to True
2327
@@ -104,8 +108,14 @@ function New-CCMDeploymentStep {
104108
$TargetGroup = @(),
105109

106110
[Parameter()]
111+
[Alias('ExecutionTimeoutSeconds', 'ExecutionTimeoutInSeconds')]
112+
[string]
113+
$ExecutionTimeout = '14400',
114+
115+
[Parameter()]
116+
[Alias('MachineContactTimeoutInSeconds', 'MachineContactTimeoutSeconds')]
107117
[string]
108-
$ExecutionTimeoutSeconds = '14400',
118+
$MachineContactTimeout = 0,
109119

110120
[Parameter()]
111121
[switch]
@@ -160,6 +170,7 @@ function New-CCMDeploymentStep {
160170
)
161171
)
162172
executionTimeoutInSeconds = $ExecutionTimeout
173+
machineContactTimeoutInMinutes = $MachineContactTimeout
163174
requireSuccessOnAllComputers = $RequireSuccessOnAllComputers
164175
failOnError = $FailOnError
165176
validExitCodes = $ValidExitCodes -join ','
@@ -207,4 +218,4 @@ function New-CCMDeploymentStep {
207218
}
208219

209220
}
210-
}
221+
}

0 commit comments

Comments
 (0)