Since xDB has been introduced the number of configuration files and roles has exploded. Ensuring that the correct configuration files are present in an environment has become a cumbersome task. Sitecore has begun to put out a spreadsheet which lists out different roles and every config file and if the file should be present in a given role.

I quickly noticed that manually selecting config files for each role was error prone, and quite frankly I'm really lazy. So, I wrote a quick and dirty PowerShell script to do this for me.

This config file, if it wasn't obvious
All you need to do is download the Excel file from Sitecore, save it as a CSV and the corresponding clean version of Sitecore. Set the appropriate paths in the PowerShell script, and a few seconds later you will end up with the correct config files for each role.