update_policy_changer.ps1

Source: https://code.ravendevteam.org/talon/update_policy_changer.ps1

Overview

This PowerShell script configures Windows Update policies on Windows Home systems to defer quality updates for 365 days, effectively applying only security updates and preventing feature updates.

Purpose & Use Cases

Allow Windows Home users to postpone feature updates for one year while still receiving security patches.

Automate the enforcement of update policies on Home editions without requiring manual registry edits.

Dependencies

PowerShell (version 5.1 or later) with administrative privileges.

Access to the HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate registry path.

Configuration & Parameters

Parameter Type Description Default
None N/A This script does not accept parameters; settings are defined in-script. N/A

Usage Example

powershell -ExecutionPolicy Bypass -File update_policy_changer.ps1

Behavior & Implementation

The script defines a hashtable of registry settings under HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate, iterates through each key–value pair to set registry properties using Set-ItemProperty with dynamic type detection, and outputs progress messages via Write-Host.

Error Handling

No explicit error handling is implemented; PowerShell will display errors if registry writes fail. Users should run the script with elevated privileges to avoid permission errors.

Security Considerations

Modifies system registry under HKLM, requiring administrator rights. Ensure the script is obtained from a trusted source to prevent malicious modifications.

Logging

The script uses Write-Host to log each registry setting applied and a final confirmation message. It does not write to external log files.

Testing & Validation

Run in a controlled environment or VM to verify HKLM policies using Get-ItemProperty or Registry Editor to confirm values are applied as expected.

Author

Author: DTLegit