Ever since Windows Vista, when a user logs in, even one with administrative rights, windows creates two logon sessions. Basically an admin has a regular user token and an admin token. In order to invoke the admin token you need UAC, or if you are running an exe or script you need to right click it and select "Run As Administrator" this will switch your user context to your admin token.