Skip to content

Commit 1f3fc8f

Browse files
Merge pull request KelvinTegelaar#1610 from kris6673/brainfart
Feat: Enhance Autopilot Status Page standard with new options and compatibility improvements
2 parents b9eecf2 + 12b53e9 commit 1f3fc8f

File tree

1 file changed

+18
-11
lines changed

1 file changed

+18
-11
lines changed

Modules/CIPPCore/Public/Standards/Invoke-CIPPStandardAutopilotStatusPage.ps1

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,16 @@ function Invoke-CIPPStandardAutopilotStatusPage {
1515
TAG
1616
DISABLEDFEATURES
1717
{"report":false,"warn":false,"remediate":false}
18+
EXECUTIVETEXT
19+
Provides employees with a visual progress indicator during automated device setup, improving the user experience when receiving new computers. This reduces IT support calls and helps ensure successful device deployment by guiding users through the setup process.
1820
ADDEDCOMPONENT
1921
{"type":"number","name":"standards.AutopilotStatusPage.TimeOutInMinutes","label":"Timeout in minutes","defaultValue":60}
2022
{"type":"textField","name":"standards.AutopilotStatusPage.ErrorMessage","label":"Custom Error Message","required":false}
2123
{"type":"switch","name":"standards.AutopilotStatusPage.ShowProgress","label":"Show progress to users","defaultValue":true}
2224
{"type":"switch","name":"standards.AutopilotStatusPage.EnableLog","label":"Turn on log collection","defaultValue":true}
2325
{"type":"switch","name":"standards.AutopilotStatusPage.OBEEOnly","label":"Show status page only with OOBE setup","defaultValue":true}
26+
{"type":"switch","name":"standards.AutopilotStatusPage.InstallWindowsUpdates","label":"Install Windows Updates during setup","defaultValue":true}
2427
{"type":"switch","name":"standards.AutopilotStatusPage.BlockDevice","label":"Block device usage during setup","defaultValue":true}
25-
{"type":"switch","name":"standards.AutopilotStatusPage.AllowRetry","label":"Allow retry","defaultValue":true}
2628
{"type":"switch","name":"standards.AutopilotStatusPage.AllowReset","label":"Allow reset","defaultValue":true}
2729
{"type":"switch","name":"standards.AutopilotStatusPage.AllowFail","label":"Allow users to use device if setup fails","defaultValue":true}
2830
IMPACT
@@ -46,14 +48,18 @@ function Invoke-CIPPStandardAutopilotStatusPage {
4648
} #we're done.
4749
try {
4850
$CurrentConfig = New-GraphGetRequest -uri "https://graph.microsoft.com/beta/deviceManagement/deviceEnrollmentConfigurations?`$expand=assignments&orderBy=priority&`$filter=deviceEnrollmentConfigurationType eq 'windows10EnrollmentCompletionPageConfiguration' and priority eq 0" -tenantid $Tenant |
49-
Select-Object -Property id, displayName, priority, showInstallationProgress, blockDeviceSetupRetryByUser, allowDeviceResetOnInstallFailure, allowLogCollectionOnInstallFailure, customErrorMessage, installProgressTimeoutInMinutes, allowDeviceUseOnInstallFailure, trackInstallProgressForAutopilotOnly
51+
Select-Object -Property id, displayName, priority, showInstallationProgress, blockDeviceSetupRetryByUser, allowDeviceResetOnInstallFailure, allowLogCollectionOnInstallFailure, customErrorMessage, installProgressTimeoutInMinutes, allowDeviceUseOnInstallFailure, trackInstallProgressForAutopilotOnly, installQualityUpdates
52+
53+
# Compatibility for standards made in v8.3.0 or before, which did not have the InstallWindowsUpdates setting
54+
$InstallWindowsUpdates = $Settings.InstallWindowsUpdates ?? $false
5055

5156
$StateIsCorrect = ($CurrentConfig.installProgressTimeoutInMinutes -eq $Settings.TimeOutInMinutes) -and
5257
($CurrentConfig.customErrorMessage -eq $Settings.ErrorMessage) -and
5358
($CurrentConfig.showInstallationProgress -eq $Settings.ShowProgress) -and
5459
($CurrentConfig.allowLogCollectionOnInstallFailure -eq $Settings.EnableLog) -and
5560
($CurrentConfig.trackInstallProgressForAutopilotOnly -eq $Settings.OBEEOnly) -and
5661
($CurrentConfig.blockDeviceSetupRetryByUser -eq !$Settings.BlockDevice) -and
62+
($CurrentConfig.installQualityUpdates -eq $InstallWindowsUpdates) -and
5763
($CurrentConfig.allowDeviceResetOnInstallFailure -eq $Settings.AllowReset) -and
5864
($CurrentConfig.allowDeviceUseOnInstallFailure -eq $Settings.AllowFail)
5965
} catch {
@@ -66,15 +72,16 @@ function Invoke-CIPPStandardAutopilotStatusPage {
6672
if ($Settings.remediate -eq $true) {
6773
try {
6874
$Parameters = @{
69-
TenantFilter = $Tenant
70-
ShowProgress = $Settings.ShowProgress
71-
BlockDevice = $Settings.BlockDevice
72-
AllowReset = $Settings.AllowReset
73-
EnableLog = $Settings.EnableLog
74-
ErrorMessage = $Settings.ErrorMessage
75-
TimeOutInMinutes = $Settings.TimeOutInMinutes
76-
AllowFail = $Settings.AllowFail
77-
OBEEOnly = $Settings.OBEEOnly
75+
TenantFilter = $Tenant
76+
ShowProgress = $Settings.ShowProgress
77+
BlockDevice = $Settings.BlockDevice
78+
InstallWindowsUpdates = $InstallWindowsUpdates
79+
AllowReset = $Settings.AllowReset
80+
EnableLog = $Settings.EnableLog
81+
ErrorMessage = $Settings.ErrorMessage
82+
TimeOutInMinutes = $Settings.TimeOutInMinutes
83+
AllowFail = $Settings.AllowFail
84+
OBEEOnly = $Settings.OBEEOnly
7885
}
7986

8087
Set-CIPPDefaultAPEnrollment @Parameters

0 commit comments

Comments
 (0)