We are managing the password reset activity from a central server for a login which is used on our servers for executing jobs and maintenance plan jobs.
We are using the below powershell script for changing password which works quite well :
$Items = Import-CSV $ENV:TEMP\PwdList.csv -Delimiter "|"
ForEach ($Item in $Items)
$Instance = $Item.ServerName
$Pwd = $Item.Pwd
$Server = New-Object Microsoft.SqlServer.Management.Smo.Server($Instance)
Everything works fine, however, there are some maintenance plan jobs which uses this login. So I have to open the maintenance Plan -> go to manage connection -> local server connection and then change the password there as well. If I do not perform this activity, the maintenance plan fails.
Can someone please let me know if there is a way to handle this as well using powershell so that everything is automated ?
Thanks in advance.