LLI Wiki — My Digital Knowledge Base

Windows: remove "managed by your organization" policies from the registry

Clean policy registry keys and local policy folders, including for another user through HKEY_USERS.

This note explains how to remove "managed by your organization" policies from the Windows registry, including for another user profile, and which locations to clean.

Edit the registry of another user

HKEY_CURRENT_USER only maps to the logged-on user. To edit another user's hive:

  1. Find the user's SID under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList.
  2. Use the same SID as a sub-key of HKEY_USERS.

Mount HKEY_USERS as a PowerShell drive:

New-PSDrive -PSProvider Registry -Name HKU -Root HKEY_USERS
Set-Location -Path 'HKU:\'

Example SID used below (placeholder): S-1-5-21-0-0-0-1001.

Disable RunLogonScriptSync

Set-ItemProperty -Path HKU:\S-1-5-21-0-0-0-1001\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System -Name RunLogonScriptSync -Value 0 -Force

Remove all policies

Delete the content of these keys.

Current user:

HKEY_CURRENT_USER\SOFTWARE\Policies
HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies
HKEY_CURRENT_USER\System\CurrentControlSet\Policies

Local machine:

HKEY_LOCAL_MACHINE\SOFTWARE\Policies
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Policies
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies
HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Policies
HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Policies

Reference: How to remove "This setting is managed by your organization".

Local Group Policy Editor: software restriction rules (disallowed paths)

Registry Editor: HKLM safer codeidentifiers PATHS key

Registry Editor: SAFER policies under HKCU Group Policy Objects

Registry Editor: SAFER policies under HKEY_USERS .DEFAULT

Delete the local group policy folders

Enable hidden files in Explorer, then, with administrator rights, delete the GroupPolicy and GroupPolicyUsers folders under \Windows\System32\.

Registry value types

Type PowerShell name
REG_SZ String
REG_DWORD DWord
REG_QWORD QWord
REG_MULTI_SZ MultiString
REG_BINARY Binary

Notes

Mastodon LLIMastodon SocialFosstodon