2

I've built an EXE that I need to run every hour, for the rest of forever. To do this, I'd like to use Windows Task Scheduler.

It would be more appropriate to run this on Windows Server, but circumstances stick me with Windows 10 Enterprise (16299).

The EXE is simple enough--pertinently running a SQL query and some network calls. No big deal.

I've set up the scheduled task, and it successfully makes network calls, but it's failing on the SQL ones.

Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'.

This error makes perfect sense for a task that isn't set up correctly, except I believe I have done the necessary steps.

enter image description here

I'm logged in with that listed account and I'm able to directly run the EXE without any errors. But any time I do it through Task Scheduler (on-demand or scheduled), it fails with the above error.

I'm using Integrated Security, of course. SQL Auth isn't an option. And I do not have any control over the SQL Server directly.

This has worked for me before, but on Windows Server. I'm not sure if there's something wonky here, or if I've just missed some setup step.

To be clear, the whole task was failing to start at all initially, before I had the computer owner grant me Logon as Batch Job rights. Given it works now, after making that change, I'm 99% sure it's trying to run as that account. So what gives?

Any ideas?

3
  • Comments are not for extended discussion; this conversation has been moved to chat.
    – Journeyman Geek
    Commented Apr 12, 2018 at 12:44
  • Having the same issue. Was this ever resolved?
    – uSlackr
    Commented Jul 1, 2022 at 19:31
  • 1
    @uSlackr I don't think it was, honestly. I think I would have posted an answer if I did figure anything out about it. I could be misremembering, but we ended up restructuring the project and migrating more things to Azure anyway (in part to avoid issues like this), so I think this became irrelevant. Sorry! Commented Jul 5, 2022 at 22:27

1 Answer 1

0

I just solved this with help over on Server fault. Requires you to run Enable-WSManCredSSP Client –DelegateComputer <host> and Enable-WSManCredSSP Server

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .