If you can use JavaScript, something like the following should do it:
var rePassword = /password=\S+/g;
while (!WScript.StdIn.AtEndOfStream)
{
WScript.StdOut.WriteLine(WScript.StdIn.ReadLine().replace(rePassword, 'password=sanitized'));
}
That will read its standard input, replace any occurrences of the string "password=" followed by any number of non-whitespace characters with the string "password=sanitized and write the results to standard output. You can tweak the rePassword regular expression and the replacement string to suit your requirements. Assuming you saved that script as "sanitize.js", you could run it from a batch script as follows:
cscript sanitize.js < logfile.log > logfile.sanitized