Command to rebuild applicationHost.config in IIS 7

Apparently, Microsoft keeps a history of these files in:

C:\inetpub\history\

Do a backup of all config files first!

So apparently, IIS keeps a history of the config files in C:\inetpub\history. So what you need to do is remember the last known date IIS worked fine and then copy the contents of the config file from c:\inetpub\history and replace config files in c:\windows\system32\inetsrv\config.

Good luck!