0

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.

Frikster
  • 101
  • 1
  • FWIW, if you're giving an account "backup files and directories" privilege, you may as well make it local admin - there's no real difference. I don't *think* there's any built-in way to configure Windows to allow a non-admin to query the scheduled tasks remotely, but there might be third-party tools. – Harry Johnston Jun 07 '18 at 05:51
  • I see. I ended up going to each individual machine and importing a scheduled task to run a powershell script that queries what tasks are on that machine. Not ideal since we'd rather just iterate through an arbitrary list of servers and fetch a list of tasks on each one. Either way, it works. – Frikster Jun 07 '18 at 21:41

0 Answers0