Microsoft Internet Security and Acceleration Server 2004 SDK

ISA Server Administration Script Samples

The following script samples, which were developed using the ISA Server administration COM objects, are provided in the SDK\Admin\Samples folder on the ISA Server 2004 CD:

Name Description
ActiveSessions.vbs A script that creates and executes a query on the FPCSessionsMonitor collection for the active sessions of the Microsoft Firewall service and displays the active sessions that existed when the query started.
AddAdmin.vbs A script that adds a specific user as an administrator with permissions to monitor the ISA Server computer and network activity, for example, to view logs and reports, but not to configure any specific monitoring functionality.
AddCacheRule.vbs A script that creates a new URL set in the URL sets collection of the proxy server, adds URLs to the URL set, and creates two new cache rules for caching content with a fixed Time to Live (TTL) range from all sites on the External network except the sites in the new URL set.
AddConnectivityVerifier.vbs A script that creates a new connectivity verifier.
AddRuleAndUrlSet.vbs A script that creates a new URL set in the URL sets collection, adds sites to the URL set, creates a new access rule, and adds the new URL set to the objects referenced in the URLSets property of the access rule.
ConfigureAlerts.vbs A script that retrieves the collection of alerts defined in the containing array, iterates through the collection, and sets the e-mail address associated with each alert definition.
ControlAccessByScheduleAndUserSet.vbs A script that creates the access rules, user set, and URL set needed to allow a specific group of workers in an organization restricted access to the Internet. The group is allowed to access only the sites listed in the URL set and only during the hours specified in the "Work hours" schedule supplied with ISA Server 2004. All other workers using computers that belong to the Internal network are granted unlimited access to the Internet.
HttpFilterConfig.vbs A script that exports the configuration for the HTTP Filter Web filter from the corresponding vendor parameters set of the specified policy rule to the specified file, or imports the configuration for the HTTP Filter Web filter from the specified file to a new vendor parameters set of the specified policy rule.
ActiveImportExport.vbs A script that exports the configuration of the array for an ISA Server computer to a specified XML file or imports the configuration in a specified XML file to the array object of the ISA Server computer.
SetNetworkRelation.vbs A script that creates a new network rule that defines a NAT relationship between any network belonging to the predefined All Protected Networks network set and the External network. This rule will apply to any new perimeter network created in the future because such a network will be included automatically in the All Protected Networks network set.
ShowICMPSystemPolicy.vbs A script that retrieves the collection of system policy rules defined for an ISA Server computer and then implicitly uses the _NewEnum property to iterate through the collection and display the names of the system policy rules for ICMP along with the user sets to which each rule applies.

This section contains the following topics with code examples taken from the samples to help you write ISA Server administration scripts in Microsoft® Visual Basic® Scripting Edition (VBScript):