Update Add-ScopeMachine.ps1

There is a bug which breaks mode complex configurations in userSettingsFile (C:\WINDOWS\system32\config\systemprofile\AppData\Local\Microsoft\WinGet\Settings\defaultState\settings.json"
pull/491/head
Andrzej Demski 2023-11-17 18:05:27 +01:00 committed by GitHub
parent c1d80d09f4
commit 4e8954415b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -15,6 +15,6 @@ function Add-ScopeMachine ($SettingsPath) {
$Preference = New-Object PSObject -Property $(@{preferences = $Scope })
Add-Member -InputObject $ConfigFile -MemberType NoteProperty -Name 'installBehavior' -Value $Preference -Force
}
$ConfigFile | ConvertTo-Json | Out-File $SettingsPath -Encoding utf8 -Force
$ConfigFile | ConvertTo-Json -Depth 100 | Out-File $SettingsPath -Encoding utf8 -Force
}