Skip to content

Set-ClientWSUSSetting have some minor issues #21

Description

@ARGO1960

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions