Deleting web sites in the IIS on XP
March 6, 2007
I recently installed EPiServer on my XP computer, which is cumbersome to say the least. For example, when you choose an existing SQL account instead of creating a new one, the installer tells you that “the account already exists” and throws an exception. Duh!
Well, due to many attempts at installing EPiServer, my IIS was crowded with duplicate EPi sites… and I couldn’t find an easy way of deleting them. EDIT: I tried deleting them in EPiServer Manager, but for some reason that didn’t work.
The answer is two things:
1. Download the Microsoft Metabase Editor, and install it. Open up and go to the W3SVC in the LM branch. There you see different numbers for each of your sites. Remember what numbers correspond to the site you want to remove (the name is usually visible in the ServerComment key).
2. Open up the good old cmd.exe, change directory to C:\inetpub\AdminScripts (or wherever your inetpub is) and type the following:
C:\inetpub\AdminScripts>adsutil.vb delete W3SVC/X
where X is the number for the site that you noted from the metabase.
Done and done!