Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Inspecting files via IIS

0 views
Skip to first unread message

Moskie

unread,
Sep 3, 2008, 8:03:17 PM9/3/08
to
Using WMI's access to IIS objects, I'm trying to write a script that
will loop through all my sites, and do something to each site that has
a web.config file. I am having trouble finding out which sites have
that file.

I'm able to loop through all my sites and get the "root" virtual
directory (an IIsWebVirtualDir object), and I can see it's path. The
difficulty is that this script is checking the sites on a remote
machine, meaning that the local path of the root virtual directory
doesn't really help. I would instead like to check for the existence
of an IIS object that represents the web.config file.

I assume (perhaps incorrectly) that since the IIS Manager application
displays the files within the currently selected directory, that
there's an IIS WMI object I can use here. Any help?

Thanks

0 new messages