Accessing Metabase properties

I m trying to access the web directories and all its properties created on IIS. I want to display virtual directory for a website and also filesystem path for that VD. Basically i want the listing of all websites and their corresponding VDs created on IIS.I dont know what APIs are available to access these properties of metabase. I was going through some documentatio and found that ADSI & WMI can be used for this. Which of this is commoly used?