Enable All Token Privileges

Mark Mo
2 min readSep 27, 2019

--

This is not new and all credit goes to Lee Holmes (@Lee_Holmes on twitter).

This morning I learned how to do this in Powershell here: https://www.leeholmes.com/blog/2010/09/24/adjusting-token-privileges-in-powershell/

All I’ve done is modify the code slightly to loop through the privileges and set them to enabled rather than setting them one at a time.

I run Powershell as admin and I see that many privileges are disabled by default.

When I run the script it enables all of the privileges.

I also built an executable out of this. On the top window I have the default permissions. When I run the Set-TokenPermission.exe, It opens a new windows (on the bottom) with the permissions set to enabled.

When time permits I’ll publish the C# code but it needs a bit more love.

The Powershell is here:(https://github.com/fashionproof/EnableAllTokenPrivs)

Feel free to follow me on twitter (@_markmo_) https://twitter.com/_markmo_

--

--

Mark Mo

@fashionproof.bsky.social on bluesky @_markmo_ on twitter