Re: automating IP Address Access Restrictions

From: Kevin Masterson (Kevin_Masterson@ncci.com)
Date: 10/08/02


From: "Kevin Masterson" <Kevin_Masterson@ncci.com>
Date: Tue, 8 Oct 2002 13:03:45 -0700


That worked great! thanks for the help.
>-----Original Message-----
>You can try IIS ADSI object IIsIPSecurity to automate IP
restriction
>setting. Please see IIS doc for details.
>
>-Ming
>
>--
>This posting is provided "AS IS" with no warranties, and
confers no rights.
>
>
>"Kevin Masterson" <kevin_masterson@ncci.com> wrote in
message
>news:ec8d01c2698a$118705a0$39ef2ecf@TKMSFTNGXA08...
>> 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
>>
>>
>
>
>.
>