Set LocalAccountTokenFilterPolicy to 1 via PowerShell

Ansible/Packer over WinRM can experience UAC Elevated rights issues if logged over the network.

To fix the issue:

How UAC remote restrictions work

To better protect those users who are members of the local Administrators group, we implement UAC restrictions on the network. This mechanism helps prevent against loopback attacks. This mechanism also helps prevent local malicious software from running remotely with administrative rights.

More information at:

  • https://docs.microsoft.com/en-us/troubleshoot/windows-server/windows-security/user-account-control-and-remote-restriction
  • https://github.com/ansible/ansible/issues/42978

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.