Skip to content

Commit 3b917c6

Browse files
committed
update standard props
1 parent a1321a9 commit 3b917c6

File tree

2 files changed

+14
-11
lines changed

2 files changed

+14
-11
lines changed

Modules/CIPPCore/Public/Set-CIPPDefaultAPDeploymentProfile.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ function Set-CIPPDefaultAPDeploymentProfile {
99
$CollectHash,
1010
$UserType,
1111
$DeploymentMode,
12-
$HideChangeAccount,
12+
$HideChangeAccount = $true,
1313
$AssignTo,
1414
$HidePrivacy,
1515
$HideTerms,
@@ -34,7 +34,7 @@ function Set-CIPPDefaultAPDeploymentProfile {
3434
'roleScopeTagIds' = @()
3535
'outOfBoxExperienceSetting' = @{
3636
'deviceUsageType' = "$DeploymentMode"
37-
'escapeLinkHidden' = $([bool]($HideChangeAccount))
37+
'escapeLinkHidden' = $([bool]($true))
3838
'privacySettingsHidden' = $([bool]($HidePrivacy))
3939
'eulaHidden' = $([bool]($HideTerms))
4040
'userType' = "$UserType"

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

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -53,21 +53,24 @@ function Invoke-CIPPStandardAutopilotProfile {
5353
$DisplayName = Get-CIPPTextReplacement -Text $Settings.DisplayName -TenantFilter $Tenant
5454

5555
$CurrentConfig = New-GraphGetRequest -uri 'https://graph.microsoft.com/beta/deviceManagement/windowsAutopilotDeploymentProfiles' -tenantid $Tenant |
56-
Where-Object { $_.displayName -eq $DisplayName } |
57-
Select-Object -Property displayName, description, deviceNameTemplate, language, enableWhiteGlove, extractHardwareHash, outOfBoxExperienceSetting, preprovisioningAllowed
56+
Where-Object { $_.displayName -eq $DisplayName } |
57+
Select-Object -Property displayName, description, deviceNameTemplate, locale, preprovisioningAllowed, hardwareHashExtractionEnabled, outOfBoxExperienceSetting
5858

5959
if ($Settings.NotLocalAdmin -eq $true) { $userType = 'Standard' } else { $userType = 'Administrator' }
60-
if ($Settings.SelfDeployingMode -eq $true) { $DeploymentMode = 'shared' } else { $DeploymentMode = 'singleUser' }
61-
if ($Settings.AllowWhiteGlove -eq $true) { $Settings.HideChangeAccount = $true }
60+
if ($Settings.SelfDeployingMode -eq $true) {
61+
$DeploymentMode = 'shared'
62+
$Setings.AllowWhiteGlove = $false
63+
} else {
64+
$DeploymentMode = 'singleUser'
65+
}
6266

6367
$StateIsCorrect = ($CurrentConfig.displayName -eq $DisplayName) -and
6468
($CurrentConfig.description -eq $Settings.Description) -and
6569
($CurrentConfig.deviceNameTemplate -eq $Settings.DeviceNameTemplate) -and
66-
([string]::IsNullOrWhiteSpace($CurrentConfig.language) -and [string]::IsNullOrWhiteSpace($Settings.Languages.value) -or $CurrentConfig.language -eq $Settings.Languages.value) -and
67-
($CurrentConfig.enableWhiteGlove -eq $Settings.AllowWhiteGlove) -and
68-
($CurrentConfig.extractHardwareHash -eq $Settings.CollectHash) -and
70+
([string]::IsNullOrWhiteSpace($CurrentConfig.locale) -and [string]::IsNullOrWhiteSpace($Settings.Languages.value) -or $CurrentConfig.locale -eq $Settings.Languages.value) -and
71+
($CurrentConfig.preprovisioningAllowed -eq $Settings.AllowWhiteGlove) -and
72+
($CurrentConfig.hardwareHashExtractionEnabled -eq $Settings.CollectHash) -and
6973
($CurrentConfig.outOfBoxExperienceSetting.deviceUsageType -eq $DeploymentMode) -and
70-
($CurrentConfig.outOfBoxExperienceSetting.escapeLinkHidden -eq $Settings.HideChangeAccount) -and
7174
($CurrentConfig.outOfBoxExperienceSetting.privacySettingsHidden -eq $Settings.HidePrivacy) -and
7275
($CurrentConfig.outOfBoxExperienceSetting.eulaHidden -eq $Settings.HideTerms) -and
7376
($CurrentConfig.outOfBoxExperienceSetting.userType -eq $userType) -and
@@ -94,7 +97,7 @@ function Invoke-CIPPStandardAutopilotProfile {
9497
devicenameTemplate = $Settings.DeviceNameTemplate
9598
allowWhiteGlove = $Settings.AllowWhiteGlove
9699
CollectHash = $Settings.CollectHash
97-
hideChangeAccount = $Settings.HideChangeAccount
100+
hideChangeAccount = $true
98101
hidePrivacy = $Settings.HidePrivacy
99102
hideTerms = $Settings.HideTerms
100103
AutoKeyboard = $Settings.AutoKeyboard

0 commit comments

Comments
 (0)