I setup 1 task with a GMSA and it works fine.
Then I want to get an email notification if the task was succesfully or not so I setup another schedule task that run with the same GMSA.
In this one I use the command get-scheduletask to have the required info, but I notice that it doesn't work.
To be more detailed, in my current task I put in a variable the get-scheduledtask and, on send-mailmessage it is the subject.
I made a test and in the send-mailmessage I replace the variable in the subject with just a word and it worked so my conclusion is that the GMSA is not able to run the get-scheduledtask.
I checked the NTFS permissions on the task folder, the task file, tried to give the gmsa full control but it keeps not working.
Any suggestion will be much appreciated