• 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]
Message << Older Topic   Newer Topic >>
VB Newbie question - 25.Oct.2002 4:54:00 PM   


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

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?

Sub DisableRules(strInterface)
On Error Resume Next

Set objISA = CreateObject("FPC.Root")

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

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
End Sub


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