TaskService ts = new TaskService();
Task task = ts.GetTask("foobar");
task.Definition.RegistrationInfo.Description = "hey";
task.RegisterChanges();TaskService ts = new TaskService(targetServer:"127.0.0.1",userName:"AzureAD\\xxx",accountDomain:"DESKTOP-xxx",password:"xxxxx");well, first, thank for reply, and yes i still have that problem on deployment server (Windows Server 2016 standard)
i can figure out which permission I need to add to SYSTEM account - since all works on my development pc (on deployment server, it creates Folder, but cant create task with
ts.RegisterTaskDefinition("some service", TaskCreation.Create, "SYSTEM", null, TaskLogonType.ServiceAccount);
i know that i can create another user just for this purpose, but i wanted to keep it with SYSTEM account or get some info how to create user JUST for this purpose, but looking for general solution which will work everywhere
do you maybe have ANY idea|?
after few hours of examination i solved it
added DefaultAppPool user to backupgroup operators
thank you for all effort!!!