reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" /v NoAutoRebootWithLoggedOnUsers /t REG_DWORD /d 1 /f
REM 5. Force update and log gpupdate /force /logoff
Install-WindowsFeature -Name GPMC Import-Module GroupPolicy
You can view and change policies using standard PowerShell registry commands. Example: Check the "Do not display the lock screen" policy:
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" /v NoAutoRebootWithLoggedOnUsers /t REG_DWORD /d 1 /f
REM 5. Force update and log gpupdate /force /logoff
Install-WindowsFeature -Name GPMC Import-Module GroupPolicy
You can view and change policies using standard PowerShell registry commands. Example: Check the "Do not display the lock screen" policy: