IIS7 question(s)

(imported topic written by dmoore21)

Since MS did away with the metabase in IIS7, I’m assuming that the IIS metabase inspectors wont work on IIS7… is there a new or preferred set of relevance or inspectors to check IIS7+ settings?

(imported comment written by Tim.Rice)

I needed to retrieve a list of sites served by our IIS servers. I am able to do it with the “of metabase” construct. See the clause below.

IF (windows of operating system AND (if( name of operating system starts with “Win” ) then platform id of operating system != 3 else true)) THEN (if exists running service “iisadmin” then (if (it contains “%00”) then (preceding text of last “%00” of it) else (it)) of (it as string) of (value whose (identifier of it as integer = 1015) of it as string & “-” & value whose (identifier of it as integer = 1023) of it as string) of keys whose (exists value whose (identifier of it as integer = 1015) of it AND exists value whose (identifier of it as integer = 1023) of it )of key “LM\w3svc” of metabase as string else “Not installed”) ELSE (“Not installed”)

(imported comment written by dmoore21)

Tim - the relevance you posted doesn’t return any results for me… Is the relevance correct?

(imported comment written by Tim.Rice)

The clause is supposed to return a list of Sites served by the IIS server. I have from a good list of IIS servers here.

I show 176 systems that have returned results, including …

  • Win 7
  • Win 2000
  • Win 2003
  • Win 2008
  • Win 2008R2
  • Win 2012

I see 36 machines (including servers) that are returning “Singular expression refers to nonexistent object”, but I don’t know why.

I have a Win7 machine with “World Wide Web Publishing Service” installed, it returns “Not installed”, when I try the core clause (minus all the EXISTS checks), I get an error on it. I show another Win7 machine returning . There are still other WinXP machines with “IIS Admin” running on them, that return .

The WinXP systems aren’t ‘my’ systems so I can’t get into them to see why they are returning errors. All I can see is “Singular expression refers to nonexistent object”.

(imported comment written by EdRedmond)

Since IIS 7 now stores all of their settings in XML files to get a listing of the sites served by an IIS serve you could use the folloiwng relevance code for that (I hope this is what you are looking for)

(node value of attribute “name” of it) of child nodes whose (node name of it as lowercase = “site”) of selects (“configuration/system.applicationHost/sites”) of xml document of file “applicationHost.config” of folder “inetsrv/config” of system x64 folder.

Hope this helps.

1 Like