In Windows operating systems, User Account Control (UAC) enforces a separation between standard user privileges and elevated administrative credentials. When an administrative user connects to a Windows 11 machine remotely—via PowerShell Remoting (WinRM), Windows Management Instrumentation (WMI), or Remote Registry—Windows automatically strips the user’s elevated administrative token, downgrading remote sessions to standard user tokens. This default security mechanism is governed by the LocalAccountTokenFilterPolicy. Systems engineers managing non-domain workgroup environments or automated deployment pipelines can configure this policy using PowerShell.
Understanding Remote UAC Token Filtering Architecture
Windows evaluates remote authentication tokens based on account origin and privilege flags:
- Default Workgroup Behaviour (Filtered Token): When connecting over the network using a local administrator account (other than the built-in RID 500
Administrator), Windows strips the administrative SID from the token. Consequently, attempts to execute elevated administrative actions over WinRM or remote PowerShell fail with Access is Denied. - Active Directory Domain Accounts: Domain administrator accounts connecting remotely are not subjected to local token filtering, retaining their elevated administrative privileges.
- The LocalAccountTokenFilterPolicy Registry Key: By setting this DWORD value to
1, Windows disables remote UAC token filtering for all members of the local Administrators group, allowing full elevated remote execution across workgroup machines.
Auditing Current LocalAccountTokenFilterPolicy Status via PowerShell
To determine whether remote UAC token filtering is currently enforced on a Windows 11 machine:
# Query the System System Policies registry key
$regPath = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System"
Get-ItemProperty -Path $regPath -Name "LocalAccountTokenFilterPolicy" -ErrorAction SilentlyContinue | Select-Object LocalAccountTokenFilterPolicy
Interpreting the returned value:
0or missing: Default secure state. Remote UAC filtering is active. Local accounts connecting remotely are stripped of administrative tokens.1: Remote UAC filtering is disabled. Local accounts connecting remotely receive their full elevated administrative token.
Enabling Remote Administrative Access via PowerShell
To allow local administrative accounts to perform remote management tasks across non-domain networks:
# Set LocalAccountTokenFilterPolicy to 1
$regPath = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System"
Set-ItemProperty -Path $regPath -Name "LocalAccountTokenFilterPolicy" -Value 1 -Type DWord -Force
# Confirm the updated value
(Get-ItemProperty -Path $regPath).LocalAccountTokenFilterPolicy
The modification takes effect immediately for new network connections without requiring a computer reboot.
Configuring Complementary WinRM and Firewall Rules
For remote PowerShell sessions (Enter-PSSession or Invoke-Command) to succeed, configure WinRM to accept local administrative credentials:
# Enable PowerShell Remoting
Enable-PSRemoting -Force
# On the client management machine: add the target machine to TrustedHosts
Set-Item WSMan:\localhost\Client\TrustedHosts -Value "192.168.1.50" -Concatenate -Force
# Test remote connection with local administrator credentials
$cred = Get-Credential
Enter-PSSession -ComputerName "192.168.1.50" -Credential $cred
Security Considerations and Hardening Best Practices
While setting LocalAccountTokenFilterPolicy=1 is essential in staging labs and workgroup management, understand the associated security implications:
- Lateral Movement Vulnerability: Disabling token filtering allows attackers possessing local administrative credentials to move laterally across workstations via SMB and WinRM.
- Unique Passwords Requirement: Ensure that every workstation utilizes a unique local administrator password (preferably managed via Windows LAPS – Local Administrator Password Solution).
- Reverting to Hardened Default: Once automated provisioning concludes, revert the policy back to its secure default:
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" -Name "LocalAccountTokenFilterPolicy" -Value 0 -Type DWord
Configuring LocalAccountTokenFilterPolicy via PowerShell grants systems administrators precise control over remote administrative authentication while balancing security and management flexibility in Windows 11.