Sometime back I reviewed the few of the sample for automating task in IIS (6, 7.x) using MWA, WMI , ADSI. Here are the links to download the sample code (C#, VB.net) from OneCode site:

  • Admin IIS7.x using MWA (C#)

 

Read More @ ASPRangers