automating IP Address Access Restrictions

From: Kevin Masterson (kevin_masterson@ncci.com)
Date: 10/01/02


From: "Kevin Masterson" <kevin_masterson@ncci.com>
Date: Tue, 1 Oct 2002 13:35:24 -0700


Hello,
I am having some difficulty automating the settings for
IP Address Access Restrictions in IIS using a vb script. I
can set almost every other property for the web servers,
but am getting a schema error when trying to set the
IPSecurity property for a virtual application. below is
the code I am using. it sets the defaultdoc property but
error out on the IPSecurity setting. can you tell me what
I need to do to get this setting automated?
Thank,
Kevin Masterson

set strNetwork = CreateObject("wscript.Network")
if not (err.number = 0) then
  errsub()
  wscript.quit
end if

strComputerName = strNetwork.computername

strMetaPathName = "IIS://" & strComputerName
& "/W3SVC/2/Root/DQI"
wscript.echo " MetaPath is: " &strMetaPathName
'**********************************************************
******

set objWebSvc = GetObject(strMetaPathName)
 if (err.number <> 0) then
   errsub()
 end if

objWebSvc.DefaultDoc = "home.asp"
objWebSvc.IPSecurity = "18 00 00 80 20 00 00 80 3C 00 00
80 44 00 00 80 01 00 00 00 4C 00 00 00 00 00 00 00 00 00
00 00 01 00 00 00 02 00 00 00 02 00 00 00 03 00 00 00 04
00 00 00 00 00 00 00 4C 00 00 80 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 FF FF FF FF 00 00 00 00 AC 14 A2
18 "

objWebSvc.SetInfo