Here are some simple one liners that will enable you to change the Windows Update Status from the Command Line. This works for Windows XP right through to Windows 8. For Windows 7 and higher you will need to run it from an elevated command prompt or from your RMM.
Enable Automatic Windows Updates
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update" /v AUOptions /t REG_DWORD /d 0 /f
Download Updates but don’t install automatically
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update" /v AUOptions /t REG_DWORD /d 3 /f
Disable Automatic Windows Updates
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update" /v AUOptions /t REG_DWORD /d 1 /f
Windows Automatic Updates Service
Disable the Service
sc config wuauserv start= disabled
Stop the Service
net stop wuauserv
Start the Service
net start wuauserv
Enable the Service
sc config wuauserv start= auto
it says access denied, and i am doing this through my administrator ID. Please respond, my microsoft store too does gets an error in installing
Even if your account is an Administrator, you may still need to choose “Run as Administrator” when running Command Prompt