This project has moved and is read-only. For the latest updates, please go here.

Getting tasks and modifying their useraccounts

Jul 2, 2012 at 3:22 PM



im hoping to get some help on my problem.

im trying to make something that will change the password of a task if it has defined a username/password

if possible i would like to do if task has username admin in it then change password to xx

i already found the way how to update the task, only i need to find a way to list all tasks and see under what user they are running

i hope i was able to explain myself well enough.


Reinier van Dijk

Jul 2, 2012 at 6:34 PM

Use the Enumerate all task example ( and then use the Task.TaskDefinition.Principal.UserId property to get the username. Once you have that, you can use TaskFolder.RegisterTaskDefinition method to re-register the task with a different set of credentials.

Jul 5, 2012 at 8:14 AM

Thanks for the reply, this was exactly what i needed!