Microsoft KB Archive/841663

= How to create a detailed firewall policy report for any firewall policy in Internet Security and Acceleration Server 2004 =

Article ID: 841663

Article Last Modified on 7/5/2005

-

APPLIES TO


 * Microsoft Internet Security and Acceleration Server 2004 Standard Edition

-





INTRODUCTION
This article describes how to use a Microsoft Visual Basic script to create a detailed firewall policy report for Microsoft Internet Security and Acceleration Server (ISA) 2004.



MORE INFORMATION
You can use the Visual Basic script that is described in this section as a template to generate a detailed firewall policy report. You can modify this script to display any combination of details about some or all of the firewall policy rules that are contained in ISA Server 2004. Microsoft provides programming examples for illustration only, without warranty either expressed or implied. This includes, but is not limited to, the implied warranties of merchantability or fitness for a particular purpose. This article assumes that you are familiar with the programming language that is being demonstrated and with the tools that are used to create and to debug procedures. Microsoft support engineers can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific requirements. This article assumes that you are familiar with the following topics:
 * Visual Basic
 * Internet Security and Acceleration Server 2004

To run the Visual Basic script:   Copy the following Visual Basic script to a text editor (such as Notepad), and then save the file by using a .vbs file name extension to your local ISA Server computer: Sub IteratePolicyRules

' Create the root obect.

Set root = CreateObject(&quot;FPC.Root&quot;)

' Declare the other objects that you want.

Dim array ' An FPCArray object

Dim spRules ' An FPCSystemPolicyRules collection

Dim rules ' An FPCPolicyRules collection

Dim rule ' An FPCPolicyRule object

Dim isEnabled ' A string

' Get references to the array object, the system

' policy rules collection, and the policy rules collection.

Set array = root.GetContainingArray

Set spRules = array.SystemPolicy.PolicyRules

Set rules = array.ArrayPolicy.PolicyRules

' List the system policy rules and indicate whether each

' rule is enabled.

WScript.Echo &quot;***System Policy Rules***&quot;

For Each rule In spRules

If rule.Enabled = True Then

isEnabled = &quot;Enabled&quot;

Else

isEnabled = &quot;Disabled&quot;

End If

WScript.Echo rule.Name & &quot;: &quot; & isEnabled

Next

' List the policy rules and indicate whether each

' rule is enabled.

WScript.Echo vbCrLf & &quot;***Policy Rules***&quot;

For Each rule In rules

If rule.Enabled = True Then

isEnabled = &quot;Enabled&quot;

Else

isEnabled = &quot;Disabled&quot;

End If

WScript.Echo rule.Name & &quot;: &quot; & isEnabled

Next

End Sub

IteratePolicyRules  In your text editor, view the script that you made in step 1. Use the commented sections of the code as a guide to modify the code to include the report information that you want, and then save your changes. Click Start, click Run, type cmd, and then click OK. At the command prompt, change to the folder that contains the .vbs file that you saved in step 3. At the command prompt, type cscript .vbs, and then press ENTER. In this command,  is the name of the file that you chose in step 1.</ol>

For more information about Internet Security and Acceleration Server 2004, visit the following Microsoft Web site.

http://www.microsoft.com/isaserver

For more information about Microsoft Visual Studio .NET, visit the following Microsoft Web site.

http://support.microsoft.com/default.aspx?scid=fh;en-us;vsnet

Additional query words: vb

Keywords: kbhowto kbinfo KB841663

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.