So here is my challenge - our IT estate has had a poorly managed admin rights control for several years and no one now knows who has them and on what machines. So, I want to create a small autohotkey executable that will detect admin rights and report back. This will then be deployed across the estate. The application will execute with admin rights, so it can access anything a normal admin could
What I need to know is, what's the best way of detecting admin rights programmatically? Ideally a command line I can run in the background. Another issue to consider is that while the current user of the machine might not have admin rights, someone else might (Rights are assigned on a username/machine combination), so it needs to check all access, not just the current user.
I know what your thinking. Why not have the AD guys check? I've looked into it and its not possible. I'm not going into the specifics, but it returns false positives.
tl;dr - how do you tell who has admin rights from the command line or some other background process the user wouldn't notice?
What I need to know is, what's the best way of detecting admin rights programmatically? Ideally a command line I can run in the background. Another issue to consider is that while the current user of the machine might not have admin rights, someone else might (Rights are assigned on a username/machine combination), so it needs to check all access, not just the current user.
I know what your thinking. Why not have the AD guys check? I've looked into it and its not possible. I'm not going into the specifics, but it returns false positives.
tl;dr - how do you tell who has admin rights from the command line or some other background process the user wouldn't notice?