Appcmd.exe and his amazing superfriends in %systemroot%\system32\inetsrv

Preface: Regardless of the size of your organization and segregation of job roles, every programmer must sometimes assume sys-admin related duties. Sometimes the programmer is also the sys-admin in a one man shop, and even in a large shop with many programmers and many system administrators, a programmer must develop the administrative procedures for the software he develops, and usually administers the working of his own box. Therefore, even though this is a programming blog, system administration tasks will be mentioned here.

Every once in a while I ask a question knowing I will be embarrassed to learn the answer. However, if google cannot lead me to the answer, there has to be someone exactly as stupid as me with he same problem. I write these words for thats persons enlightenment, and to allow everyone else to mock me.

So I was looking for methods for generating reports about IIS virtual hosts, when google pointed me to appcmd.exe. This is a swiss army knife executable for command line administration of several aspects of windows. Much of its IIS related functionality previously existed in vbsripts. The only problem was I could not find it. It was not available on my path and explorer search did not find it. I tried to find an appcmd feature or role to windows and did not find one. Finally, I violated the unwritten code of men and asked for directions. I opened a ticket with out co-location provider.

The response I got was short and professional. The executables full path is “c:\windows\system32\inetsrv\appcmd.exe”. I realized the following steps were necessary at this point:

  1. Add “c:\windows\system32\inetsrv” to the system path.
  2. Write this article
  3. Figure out why my usage of explorer search did not turn up this executable.
  4. Write a follow-up article on how to modify ones path and other envirormental variables in Windows Server 2008.
  5. Write a followup article on how to search for files in explorer in Windows 2008

So stay tuned for more articles