Мелочи: Как программно получить все настройки IIS virtual directory

??????, ???????, ?? ?????? ???? ????? ??????????, ??? ?????? ?? ??????????, ??? ?????? ?????????, ? ????? ?? ?????? ????????? ?????? (??? ?????? :-) ) ???????, ???? adsutils.vbs, ?? ???, ?? ?????? ???? ????????? ??? ?? ??? ????????...

? ???????? ??? ???????? ??? ???. ?????? ?? ???????? ?????????? ????? ??????, ???????????? ? ??????... ??? directory ??????? ?????????? ? ????????? ?????? (??? ????? ?????? ??? ?????). ???????? ? ?????????? ?????? ???????? ???????? ? ?????? ?????? (???? ? ??? ?????? ?????? ?? ??????, ????????? ????? ????, ??????? ??????). ???????? ?? C#, ???????? ??? command-line program.

using System;
using System.DirectoryServices;

namespace DumpIISProperties
{
    class Program
    {
        static void Main(string[] args)
        {

            DirectoryEntry de = new DirectoryEntry("IIS://machinename/W3SVC/1/root" + (args.Length > 0 ? "/" + args[0] : ""),
                                                                      "administrator", "password", AuthenticationTypes.Secure);

            foreach (string prop in de.Properties.PropertyNames)
            {
                Console.WriteLine(prop + " " + de.Properties[prop].Value);
            }
        }
    }
}

 

? ??? ??????? ??????????? ?? ????? ??? ?????????????? ????: "???? ??? ???" ????? ???????? ????? ????????? ???????????, ? ???????? ?? ???????? ?????? ???? ??????? ?? ?????? ? ???????.