update scheduled task password which are running with specific user

Hi,
Can someone help me on how to change scheduled task password which are running with specific user on multiple servers.
$ServerList = get-content Servers.txt
Foreach ($server in $serverlist)
{
write-host $server -fore green
SCHTASKS /Change /s $Server /RU /RP /TN TaskName
}

Problem is I have different scheduled tasks running with specific user on remote server. I need to change them.
Apart from that, I need the result to a text file, which will say success or failure.

-Kalyan

This might do the trick ITPro Today: IT News, How-Tos, Trends, Case Studies, Career Tips, More

Also this one https://gallery.technet.microsoft.com/scriptcenter/Get-Scheduled-tasks-from-3a377294/view/Discussions#content