GPO management added
parent
4f2a51bf61
commit
c5d5ee1b5e
|
@ -349,6 +349,16 @@
|
||||||
<elements>
|
<elements>
|
||||||
<text id="MaxLogSize" valueName="WAU_MaxLogSize" />
|
<text id="MaxLogSize" valueName="WAU_MaxLogSize" />
|
||||||
</elements>
|
</elements>
|
||||||
|
</policy>
|
||||||
|
<policy name="UserApproval_Enable" class="Machine" displayName="$(string.UserApproval_Name)" explainText="$(string.UserApproval_Explain)" key="Software\Policies\Romanitho\Winget-AutoUpdate" valueName="WAU_UserApproval">
|
||||||
|
<parentCategory ref="WAU"/>
|
||||||
|
<supportedOn ref="WAU:SUPPORTED_WAU_1_16_0"/>
|
||||||
|
<enabledValue>
|
||||||
|
<decimal value="1" />
|
||||||
|
</enabledValue>
|
||||||
|
<disabledValue>
|
||||||
|
<decimal value="0" />
|
||||||
|
</disabledValue>
|
||||||
</policy>
|
</policy>
|
||||||
</policies>
|
</policies>
|
||||||
</policyDefinitions>
|
</policyDefinitions>
|
||||||
|
|
|
@ -140,6 +140,10 @@ If this policy is disabled or not configured, the default number is used.</strin
|
||||||
Default size is 1048576 = 1 MB
|
Default size is 1048576 = 1 MB
|
||||||
|
|
||||||
If this policy is disabled or not configured, the default size is used.</string>
|
If this policy is disabled or not configured, the default size is used.</string>
|
||||||
|
<string id="UserApproval_Name">Specify if user approval is needed before updating apps</string>
|
||||||
|
<string id="UserApproval_Explain">This policy setting specifies whether to require user approval before updatings available application updates .
|
||||||
|
|
||||||
|
If this policy is disabled or not configured, the default is No.</string>
|
||||||
</stringTable>
|
</stringTable>
|
||||||
<presentationTable>
|
<presentationTable>
|
||||||
<presentation id="BlackList">
|
<presentation id="BlackList">
|
||||||
|
|
|
@ -356,6 +356,15 @@ Function Get-Policies {
|
||||||
$ChangedSettings++
|
$ChangedSettings++
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($null -ne $($WAUPolicies.WAU_UserApproval) -and ($($WAUPolicies.WAU_UserApproval) -ne $($WAUConfig.WAU_UserApproval))) {
|
||||||
|
New-ItemProperty $regPath -Name WAU_UserApproval -Value $($WAUPolicies.WAU_UserApproval) -PropertyType DWord -Force | Out-Null
|
||||||
|
$ChangedSettings++
|
||||||
|
}
|
||||||
|
elseif ($null -eq $($WAUPolicies.WAU_UserApproval) -and ($($WAUConfig.WAU_UserApproval) -or $($WAUConfig.WAU_UserApproval) -eq 0)) {
|
||||||
|
Remove-ItemProperty $regPath -Name WAU_UserApproval -Force -ErrorAction SilentlyContinue | Out-Null
|
||||||
|
$ChangedSettings++
|
||||||
|
}
|
||||||
|
|
||||||
#Get WAU Configurations after Policies change
|
#Get WAU Configurations after Policies change
|
||||||
$Script:WAUConfig = Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Winget-AutoUpdate"
|
$Script:WAUConfig = Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Winget-AutoUpdate"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue