Hello folks,
I have created a gMSA for this domain and want it to be able to run a scheduled task. We have the exact same process on a different forest working but one forest the DCs there refused to run the identical task. I then tested the process on another server on the problem forest and it worked fine so I know the "-PrincipalsAllowedToRetrieveManagedPassword" group I specified is working and I did confirm all the DCs (3) that I've tried to create this identical task on are part of this group as well.
On both the working system and the non working DCs they both have the same logon as a batch job perms (I noted with the event ID that was the most common). The test task itself just writes a txt file to a local path, I also granted the gMSA rights to that path just incase that's why it's not running.
Every time I try to kick of the task on the non working system (the DCs) I get an Event ID 101 "Task Start Failed" Error Value: 2147943785.
Any ideas given it has logon as a batch rights?
EventLog:
Log Name: Microsoft-Windows-TaskScheduler/Operational
Source: Microsoft-Windows-TaskScheduler
Date: 11/16/2021 1:00:00 PM
Event ID: 101
Task Category: Task Start Failed
Level: Error
Keywords: (1)
User: SYSTEM
Computer: Workstation.xyz.com
Description:
Task Scheduler failed to start "\test" task for user "xyz\gMSAaccount$". Additional Data: Error Value: 2147943785.
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
<Provider Name="Microsoft-Windows-TaskScheduler" Guid="{DE7B24EA-88DD-4A09-888G-5BDADCFA9017}" />
<EventID>101</EventID>
<Version>0</Version>
<Level>2</Level>
<Task>101</Task>
<Opcode>101</Opcode>
<Keywords>0x8000000000000001</Keywords>
<TimeCreated SystemTime="2021-11-16T18:00:00.150012900Z" />
<EventRecordID>371293</EventRecordID>
<Correlation />
<Execution ProcessID="588" ThreadID="7084" />
<Channel>Microsoft-Windows-TaskScheduler/Operational</Channel>
<Computer>Workstation.xyz.com</Computer>
<Security UserID="S-1-5-18" />
</System>
<EventData Name="TaskStartFailedEvent">
<Data Name="TaskName">\Test</Data>
<Data Name="UserContext">xyz\gMSAaccount$</Data>
<Data Name="ResultCode">2147943785</Data>
</EventData>
</Event>