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.
As I alluded to in the comments, this can be solved by:
# 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
If the task contains stored logon credentials you'll need to specify the credentials again when updating the task:
$task |Set-ScheduledTask -User $logonUser -Password $logonPassword