Link to home
Start Free TrialLog in
Avatar of LrdKanien
LrdKanien

asked on

iisvdir /query doesn't return vdirs

32bit - Win2k3 IIS6 running command 'iisvdir /query w3svc/1' returns all of the virtual directories under the root.

On another 32bit - Win2k3 IIS6 command 'iisvdir /query w3svc/1' returns "No virtual sub-directories available."

Both servers have virtual sub directories, but the 2nd server isn't listing them with the iisvdir.  Any ideas?
Avatar of meverest
meverest
Flag of Australia image

Hello,

permissions maybe?

Try defining interactive user when running the script:

/u [Domain\]User /p Password

e.g.:

iisvdir /u SERVER\Administrator /p adminpass /query w3svc/1

cheers,  Mike.
Avatar of LrdKanien
LrdKanien

ASKER

ran specifying local adminstrator and same results.
Maybe the default web site has a different number than '1'

try adsutil.vbs to see what the web site IDs are, eg:

c:\inetpub\adminscripts\adsutil.vbs ENUM /P W3SVC

[/W3SVC/1]
[/W3SVC/1174731628]
[/W3SVC/AppPools]
[/W3SVC/Filters]
[/W3SVC/Info]


the result set shows that there is a web site ID 1 as well as ID 1174731628

enumerate the subfolders of that web site by:

c:\inetpub\adminscripts\adsutil.vbs ENUM /P W3SVC/1174731628

..etc..

Cheers.
I can use adsutil /enum w3svc/1/root and it will list the vdirs, however iisvdir doesn't.  Also if I try to specify as you have done above it shows as:

C:\Inetpub\AdminScripts>adsutil.vbs ENUM /P W3SVC/[/W3SVC/1]

The path requested could not be found.
ErrNumber: -2147024893 (0x80070003)
Error Trying To ENUM the Object (GetObject Failed): W3SVC/[/W3SVC/1]

Yes the default site has ID1.  I cannot figure out why iisvdir works on one server and not another.

C:\Inetpub\AdminScripts>iisvdir /query w3svc/1
Connecting to server ...Done.
No virtual sub-directories available.

c:\inetpub\adminscripts\adsutil.vbs ENUM /P W3SVC/1/root
[/W3SVC/100059105]
[/W3SVC/1002649854] and so on...
ASKER CERTIFIED SOLUTION
Avatar of meverest
meverest
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
even the boys at M$ had no clue.