Hi Jason,
You may consider writing some scripts to manually set the IPSecurity
properties. I attached some samples here for your reference.
setIP.txt
====================
Option explicit
dim objIpServer
dim objIPSec
dim arHostsRead
dim nCounter
dim IpToaddStr
dim tmpStr
IpToaddStr= "134.0.0.1, 255.255.255.0"
if(instr(IpToAddStr,", ")<1) then
wscript.echo "IpAddress for grant is NOT in the correct format"
wscript.echo "IP to Add : "+IpToaddStr
wscript.echo "Format Sample: 123.0.0.1, 255.255.255.255"
wscript.echo "Program exits"
wscript.quit
end if
set objIpServer=GetObject("IIS://localhost/W3Svc/1/root")
objIpServer.getinfo
wscript.echo "Got the IP list object"
SET objIPSec = objIpServer.get("IPSecurity")
wscript.echo "Got IP List"
arHostsRead=objIPSec.IPGrant
for nCounter=0 to ubound(arHostsRead)
tmpStr = arHostsRead(nCounter)
wscript.echo tmpStr
if tmpStr=IpToAddStr then
wscript.echo "The new record is already in the IP list"
wscript.echo "No need to add"
wscript.echo "Program exits"
wscript.quit
return
end if
next
redim preserve arHostsRead (UBound(arHostsRead)+1)
arHostsRead (UBound(arHostsRead)) = IpToAddStr
objIPSec.ipgrant=arHostsRead
objIPSec.grantbydefault=false
objIpServer.put "IPSecurity" ,objIPSec
wscript.echo "Setting info"
objIpServer.setinfo
wscript.echo "Done"
ReadSetting.txt
==================
Option explicit
dim objIpPServer
dim objIPSec
dim nCounter
dim arHostsRead
set objIpPServer=GetObject("IIS://localhost/w3svc/1/root")
objIpPServer.getinfo
wscript.echo "Got IP list For Grant"
SET objIPSec = objIpPServer.get("IPSecurity")
arHostsRead=objIPSec.IPGrant
for nCounter=0 to ubound(arHostsRead)
wscript.echo arHostsRead(nCounter)
next
Thanks and have a nice day.
Sincerely,
WenJun Zhang
Microsoft Online Community Sup****t
==================================================
Get notification to my posts through email? Please refer to:
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.
Note: The MSDN Managed Newsgroup sup****t offering is for non-urgent issues
where an initial response from the community or a Microsoft Sup****t
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the sup****t
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Sup****t Engineer by contacting
Microsoft Customer Sup****t Services (CSS) at:
http://msdn.microsoft.com/subscriptions/sup****t/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no
rights.


|