I want to query a remote server's tasks:
schtasks /query /s <server-name>
ERROR: Access is denied.
The account I am running this from is not a local admin on the remote server, but I have the following set up:
- The account has read and execute permissions to C:\Windows\System32\Tasks on the remote server (as per "allow-to-view-and-run-scheduled-tasks-without-admin-rights")
- The account has the following user rights assignment set on local security policy on the remote server (these were chosen using an answer given here, although I kept adding to it to try and get it to work):
- Allow log on locally
- Backup files and directories
- Log on as a batch job
- Log on as a service
- Manage auditing and security log
- Generate Security Audit
It is not a firewall issue as an admin account can remote into the server and run the query.
All other similar issues I've seen are to do with how to run a task without being a local admin on the remote server. I only want to query the tasks as a non-admin.