This is where I will place code samples that you are free to use for personal use. You can publish these codes samples with my permission.
Query SQL Server Configuration Settings
How to query the SQL Server settings. This code snippet will do just that: ServerConfigurationSettings
This code can be used to capture statistics related information for an entire database. By modifying the WHERE clause, you can also narrow down the data being returned.
Click Here: ModificationCounts