• RSS
  • Twitter
  • FaceBook

Welcome to ISAserver.org

Forums | Register | Login | My Profile | Inbox | RSS RSS icon | My Subscription | My Forums | Address Book | Member List | Search | FAQ | Ticket List | Log Out

VB Newbie question

Users viewing this topic: none

Logged in as: Guest
  Printable Version
All Forums >> [ISA Server 2000 Misc.] >> ISA Server Programming >> VB Newbie question Page: [1]
Login
Message << Older Topic   Newer Topic >>
VB Newbie question - 25.Oct.2002 4:54:00 PM   
(null)

 

Posts: 2
Joined: 25.Oct.2002
Status: offline
Hi,

I'm trying to write a vb script that disables the published services on a certain interface.
For some reason the changes are not saved.

Am I doing something wrong?

code:
  
Sub DisableRules(strInterface)
On Error Resume Next

Set objISA = CreateObject("FPC.Root")
objISA.Refresh

Set objArray = objISA.Arrays.Item("RE004")
Set objServer = objArray.Servers("RE004")
Set bFound = False

For Each objAdapter in objServer.Adapters
If objAdapter.IpAddresses = strInterface Then
bFound = True
Exit For
End If
Next

If Not bFound Then
wscript.echo "Could not find an adapter with ip " & strInterface
Exit Sub
End If

wscript.echo "Found adapter: " & objAdapter.Description

For Each objRule In objArray.Publishing.ServerPublishingRules
If objRule.ExternalIp = strInterface Then
objRule.Enable = False
objRule.Save 'DOESN'T GET SAVED ! WHY ?!
End If
Next
End Sub

ResetRules("194.109.54.205")

Thanx.
Post #: 1

Page:   [1] << Older Topic    Newer Topic >>
All Forums >> [ISA Server 2000 Misc.] >> ISA Server Programming >> VB Newbie question Page: [1]
Jump to:

New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts