1

I am trying to disable a Task from task scheduler on multiple remote servers and while I do that I want to update the description of these tasks as well.

Though the command sets to work on schedule tasks are pretty straight forward like: Get-Scheduledtask Disable-ScheduledTask Set-ScheduledTask Etc.

I am unable to find parameters or command line that helps modify the Description of an existing task.

Would appreciate if anyone has any insights on this or was able to find a workaround.

Thank you!

1 Answers1

2

As I alluded to in the comments, this can be solved by:

  1. Fetching the existing task instance
  2. Modifying the description on the existing instance
  3. Updating the task
# fetch existing task object
$task = Get-ScheduledTask "Pooja's Task"

# update the description
$task.Description = "New and improved description!"

# persist the change
$task |Set-ScheduledTask
Mathias R. Jessen
  • 157,619
  • 12
  • 148
  • 206