Skip to content

windows_update_access_toggle.ps1

Corey Watson edited this page Dec 1, 2025 · 1 revision

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

  1. Checks current state of SetDisableUXWUAccess registry key
  2. Toggles the state (add/remove key)
  3. 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

Clone this wiki locally