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
parent
c1d80d09f4
commit
4e8954415b
|
@ -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
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue