DirectoryEntry de1 = new DirectoryEntry();String path = "IIS://localhost/W3SVC/1/ROOT";DirectoryEntries de2 = de1.Children;foreach (DirectoryEntry de3 in de2){//can access metadata of each website on iis here}