Why does schtasks.exe no longer work remotely on windows server 2019?

Andreas Meyer zu Driehausen 6 Reputation points
2022-01-21T15:24:38.19+00:00

Hello,
I administrate many servers. I have a mix of Windows Server 2012R2, Windows Server 2016 and Windows Server 2019.
On Windows Server 2012R2 I could still trigger from Server-X remotely a task on Server-Y (using: schtasks /S server-y /TN "taskname").
On Windows Server 2012R2 a file c:\windows\system32\taskeng.exe still exists.
On Windows Server 2016 triggering tasks on remote servers worked mostly. But it did occur already on one system that it did not work.
On windows server 2016 taskeng.exe no longer exists. Which is the file that now takes over the functionality that formerly taskeng.exe had?
On Windows Server 2019, after IPU (InPlaceUpgrade to Windows Server 2019), I can no longer trigger tasks on remote servers.
taskeng.exe does not exist.

I am certain that this disfunctionality has come by Windows Updates or InPlaceUpgrades.
To me it seems, Microsoft no longer wants to support this?
By policy we do not install tools like sysinternals. So I cannot use those instead.

Could someone please explain to me why running tasks on remote servers with schtasks.exe was disabled?
Thank you.

Windows Server 2019
Windows Server 2019
A Microsoft server operating system that supports enterprise-level management updated to data storage.
3,472 questions
Windows Server
Windows Server
A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.
12,178 questions
0 comments No comments
{count} vote

4 answers

Sort by: Most helpful
  1. Michael Taylor 48,581 Reputation points
    2022-01-21T16:04:24.12+00:00

    schtasks should work on remote servers assuming permissions and whatnot are correct. It is the recommended approach to managing remote tasks if you're not using a scripting tool like Powershell. Can you post an example of the command you're running along with any errors you're getting so we can diagnose the issue?

    taskeng is the old task engine and was deprecated quite a while ago. The fact that it was available on some of the newer Server OSes is for compatibility most likely but it was removed from client a while ago IIRC.

    0 comments No comments

  2. Limitless Technology 39,376 Reputation points
    2022-01-21T22:11:43.02+00:00

    Hello @Andreas Meyer zu Driehausen

    You are right, this feature has been removed in the recent updates as well in Windows 11, due to the potential security breaches that it would cause if infected by malware / virus.

    The "modern" way, would be to manage these Tasks using GPOs, as a user described in this forum thread: https://learn.microsoft.com/en-us/answers/questions/87291/create-a-task-scheduler-via-gpo.html

    Hope this helps with your query,

    ---------
    --If the reply is helpful, please Upvote and Accept as answer--

    0 comments No comments

  3. Andreas Meyer zu Driehausen 6 Reputation points
    2022-01-25T11:04:39.06+00:00

    Hi,
    is it just that taskeng has been removed and been replaced with some other tool?
    Or is it that schtasks.exe now by design can no longer trigger a task remotely on another server?
    Thank you.


  4. MotoX80 31,976 Reputation points
    2022-01-25T15:41:03.833+00:00

    What error message are you getting?
    Did you do any troubleshooting to try to isolate the problem?

    Have you looked for errors in the System/Security/Application eventlogs?
    Have you temporarily turned the Windows firewall off to see if it was blocking the remote calls?
    Is the account you are logged in with have administrator rights on the target system?
    Can you access the C$ share on the target machine?
    Can you display the task names?

    dir \\RemoteServerName\c$
    schtasks /query /s RemoteServername
    
    0 comments No comments