Quantcast
Viewing all articles
Browse latest Browse all 9518

Reset Windows Update settings back to default, including respective local policy, by command-line only?

I have many Windows 10 and Windows 11 machines, which are in different states of windows update settings. Unfortunately, some machines have local policies active for windows update settings.

I need to have all PC's reset to the windows update defaults and I need to do it with a remote tool that can execute CLi commands (PowerShell and such).

Usually, I would just delete HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate. That works fine, until the machine is rebooted and the still existing local policy kicks in and changes windows update back to the previous setting.

I could, of course, remote to each machine by RDP or TeamViewer or whatever, start gpedit.msc and change the respective settings to "not configured", delete the registry key again and reboot.

However, I want to do it by command line, PowerShell script or similar.

I know how to delete the registry key that way, but I do not know how to set the group policy entries to "not configured" from the command line.

What would be a good way to achieve that?

I tried LGPO.exe, but frankly I do not understand how to use this tool for my purpose.


Viewing all articles
Browse latest Browse all 9518

Trending Articles