Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set-ClientWSUSSetting have some minor issues #21

Open
ARGO1960 opened this issue Aug 5, 2021 · 0 comments
Open

Set-ClientWSUSSetting have some minor issues #21

ARGO1960 opened this issue Aug 5, 2021 · 0 comments

Comments

@ARGO1960
Copy link

ARGO1960 commented Aug 5, 2021

Hi Great work saved me some time ;-)
But it took me some time as AUOptions did never got higher than 3 in the registry.
Also got the message that automatic downloads are disabled.. (w10 21H1)
Looks like NoAutoUpdate needs to be reversed..
here I have some enhancements for that issue's

The following " } ElseIf ($Options = " should be " } ElseIf ($Options -eq"
That way "AUOptions" can get higher than 3 ;-)
Line 223,225 and 227
If ($PSBoundParameters['Options']) {
If ($pscmdlet.ShouldProcess("Options","Set Value")) {
If ($Options -eq 'Notify') {
$WsusConfig.SetValue('AUOptions',2,[Microsoft.Win32.RegistryValueKind]::DWord)
} ElseIf ($Options = 'DownloadOnly') {
$WsusConfig.SetValue('AUOptions',3,[Microsoft.Win32.RegistryValueKind]::DWord)
} ElseIf ($Options = 'DownloadAndInstall') {
$WsusConfig.SetValue('AUOptions',4,[Microsoft.Win32.RegistryValueKind]::DWord)
} ElseIf ($Options = 'AllowUserConfig') {
$WsusConfig.SetValue('AUOptions',5,[Microsoft.Win32.RegistryValueKind]::DWord)
}
}
}

Then there is an mistake at: AllowAutomaticUpdates starting from line 310.

When Enabled it enables NoAutoUpdate to 1, when I do this at Windows10 21H1 it says automatic updates disabled.
changing it to 0, NoAutoUpdate to 0 and that message Disappears .
So I changed 313 and 317 1to0 and 0to1.

Hope it helps someone else.
Anyway keep up the good work!.
Arnold.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant