A console-app runs on a server in a domain and is tasked with deleting some home areas of users, who are no longer active.
The account runs under the context of an account, that is also a member of the Local Administrator group on each storage server, which has “Full Control” access to the relevant folders.
This works great on a bunch of older servers, but on Windows 2008 it runs into problems. On these servers, “Admin Approval Mode” is enabled for the “Local Administrator” group.
For instance, if I right-click a folder and try to access properties/security (using the same service account), I get this prompt:

I can press continue, and then proceed to use the full control permissions. If I do the same when deleting files, things work like intended.
There are two potential solutions, as I see it:
- The “Admin approval mode” is removed. This is not a viable option according to the security-people here.
- The console-app can somehow do the code-equivalent of pressing “Continue” and proceeding.
Is option no. 2 possible? If so, what would that code look like – or what key concepts do I need to research further to find out?
Thanks for the suggestions.
There is no solution to this BY DESIGN, so I am making this the answer.