Please note that there is a known memory leak issue caused by MS. Read this KB
article: KB893317

I assume the user is familiar with WMI and has already set up his/her machine to compile WMI projects. if not, then check Set Up Delphi For WMI

List all virtual directories from IIS with path and website on the local machine using WMI in Delphi

NOTE: as stated in MSDN, WMI is NOT AVAILABLE on IIS 5.1 or lower.
.

Source Code