3

I have a Windows 2003 IIS6 setup.

I would like to get an extract (system output) of all the header dns entries (virtual hosts etc).

As I need to move my server and just updated the IPs (I don't have direct access to my DNS server as it is managed by our hosting provider, and I can't very well just say "updated all our domains" as we have other servers.

And no, I don't have a pre-existing list, some of this was done before I joined my company.

Thoughts? Is there a way or do I go through manually and do it?

HopelessN00b
  • 53,795
  • 33
  • 135
  • 209
Jakub
  • 380
  • 1
  • 11

1 Answers1

3

You can list the existing sites with:

cscript C:\WINDOWS\system32\iisweb.vbs /query

Output looks like the following, the Host column is the host header value.

Connecting to server ...Done.
Site Name (Metabase Path)                     Status  IP              Port  Host
================================================================================
Default Web Site (W3SVC/1)                    STARTED ALL             80    N/A
directory.example.com (W3SVC/2)               STARTED ALL             80    directory.example.com

Here is the Technet for iisweb.vbs as well as the Managing Web Sites Using Scripts parent article.

jscott
  • 24,484
  • 8
  • 79
  • 100
  • Great! Yep that's what I need :) Will accept your answer once it lets me (currently saying minimum 5 min) – Jakub Jul 15 '11 at 17:31