Here's the first version of my Index_Analysis.sql script, which examines all the indexes in the current database and emits DML code to correct any problems it finds.
This post has been moved to http://sqlsoundings.blogspot.com/2010/02/script-produces-dml-to-fix-index.html .