In reviewing the configuration of my IIS servers, I decided to remove the Administration Web Site since it’s never used. When you right click on the web site, the Delete option does not appear. Here’s how to remove the site if there is no Delete option? Since Microsoft does not allow you to delete, does this mean we shouldn’t?

There is a property in the metabase called NoDelete that can be set for a web site. When enabled, the Delete option is removed from the list of choices when you right click on the web site. By default, this option is enabled for the Administration Web Site, meaning that you cannot delete it from the Internet Information Services snap-in like you can other web sites. You should not misconstrue this to mean that you should not remove it if it’s not in use.

There are numerous other means to remove the web site:

• Select Add/Remove Programs, Add/Remove Windows Components, then select Internet Information Services (IIS) and click Details. Clear the check box next to Internet Services Manager (HTML) and click OK, then Next.

• Use MetaEdit to delete the Administration Web Site. This will normally be web site number 2, but be sure to check the Server Comment property to make certain.

• Save the following script as a .vbs file and run it.

WScript.Echo "This script will delete the Administration Web Site"
Set objIISW3SVC = GetObject("IIS://localhost/W3SVC")
For Each Site in objIISW3SVC
If Site.Class = "IIsWebServer" Then
Set objIIsWebSite=GetObject(Site.ADsPath)
If objIIsWebSite.Get("ServerComment") = "Administration Web Site" Then
objIISW3SVC.Delete "IIsWebServer", Site.Name
WScript.Echo objIIsWebSite.Get("ServerComment") & "has been deleted."
End If
End If
Next

Spread the word:
  • Digg
  • Technorati
  • del.icio.us
  • YahooMyWeb
  • co.mments
  • Furl

If you're new here, you may want to subscribe to my RSS feed. Thanks for visiting!