hello all,

Im having an issue I cant seem to understand. I am trying to write code
that will use WMI to edit the MB properties. Below is the code I would use
to edit the MB properties for the default web site:

set providerObj = GetObject("winmgmts://localhost/root/MicrosoftIISv2")
set nodeObj = providerObj.get("IIsWebServerSetting='W3SVC/1'")

How about if I want to edit the MASTER properties? I try the below code and
get errors.

set providerObj = GetObject("winmgmts://localhost/root/MicrosoftIISv2")
set nodeObj = providerObj.get("IIsWebServerSetting='W3SVC")

I have also tried the following w/ out any luck:

set providerObj = GetObject("winmgmts://localhost/root/MicrosoftIISv2")
set nodeObj = providerObj.get("IIsWebService='W3SVC'")

any help would be appreciated

TYVMIA

Re: IIS-WMI help by Kristofer

Kristofer
Fri Feb 03 17:07:35 CST 2006

Perhaps you are looking for IIsWebServiceSetting? IIsWebService will only
give you the methods and read-only properties, which may not be what you
want if you want to modify anything.

"IIsWebServiceSetting (WMI)"
http://msdn.microsoft.com/library/en-us/iissdk/html/072115aa-c527-41b4-8d01-b147a07f9c05.asp


--
Regards,
Kristofer Gafvert
http://www.gafvert.info/iis/ - IIS Related Info


iisTech wrote:

>hello all,
>
>Im having an issue I cant seem to understand. I am trying to write code
>that will use WMI to edit the MB properties. Below is the code I would use
>to edit the MB properties for the default web site:
>
>set providerObj = GetObject("winmgmts://localhost/root/MicrosoftIISv2")
>set nodeObj = providerObj.get("IIsWebServerSetting='W3SVC/1'")
>
>How about if I want to edit the MASTER properties? I try the below code
>and
>get errors.
>
>set providerObj = GetObject("winmgmts://localhost/root/MicrosoftIISv2")
>set nodeObj = providerObj.get("IIsWebServerSetting='W3SVC")
>
>I have also tried the following w/ out any luck:
>
>set providerObj = GetObject("winmgmts://localhost/root/MicrosoftIISv2")
>set nodeObj = providerObj.get("IIsWebService='W3SVC'")
>
>any help would be appreciated
>
>TYVMIA