windows_update_access_toggle.ps1 - limehawk/rmm-scripts GitHub Wiki
windows_update_access_toggle.ps1
Toggles user access to Windows Update settings in the Settings app.
Overview
This script toggles user access to Windows Update settings. If access is currently blocked, it will be enabled. If access is currently allowed, it will be blocked.
Purpose
Toggles user access to Windows Update settings in the Settings app. If access is currently blocked, it will be enabled. If access is currently allowed, it will be blocked.
Prerequisites
- Windows 10/11
- Administrator privileges
Configuration
Required Inputs
None
Behavior
- Checks current state of SetDisableUXWUAccess registry key
- Toggles the state (add/remove key)
- Reports new state
Security Notes
- No secrets in logs
- Modifies Windows Update policy registry
Exit Codes
- 0 = Success
- 1 = Failure
Example Output
[ CHECKING CURRENT STATE ]
--------------------------------------------------------------
Registry Path : HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate
Key Name : SetDisableUXWUAccess
Current State : Access ALLOWED (key not present)
[ TOGGLING STATE ]
--------------------------------------------------------------
Action : Blocking access
Result : Key created with value 1
[ FINAL STATUS ]
--------------------------------------------------------------
New State : Access BLOCKED
Users cannot access Windows Update settings.
SCRIPT SUCCEEDED
[ SCRIPT COMPLETED ]
--------------------------------------------------------------
Version History
- 2024-12-01 v1.0.0 - Initial release - migrated from SuperOps
Links
- View Script Source
- Scripts - Back to script index