Exchange Server Scripting Agent Sample Script COUNTER - (counterV.txt or counterVJ.txt) This sample script provides an automatic reply message in a folder, the body of which counts the total number of messages in the folder. Note that there are two versions of this script, one written entirely in VBscript (counterV.txt) and one written in a mixture of VBscript and JavaScript (counterVJ.txt). The latter version is provided as a simple example of how to mix languages in the same script. To Install this Sample: 1. Make sure that Event Service is installed and running on your Exchange Server. 2. Ensure that you have given yourself permission to install & run scripts on this server. See the "Microsoft Exchange Server Getting Started Guide" for further information. 3. Open the "counterV.txt" file using Notepad. Select all of the text, and copy it to the clipboard. 4. From Microsoft Outlook 8.03, select a Public Folder for which you are the owner. 5. Right-click on the folder, and choose Properties. Click the Agents tab. 6. Create a new agent. Click the Edit button to edit its properties. 7. Enable the checkboxes for the following events: [x] A new item is posted in this folder [x] An item is changed in this folder 8. Click Edit Script. A blank script skeleton is shown. 9. Select all of the text in the script. Paste the contents of the clipboard (counterV.txt), replacing the previous script contents. Click OK and save the agent. To Test this Sample: Post a new message into the folder. In about 60 seconds, the agent will be activated, and you should receive a reply message that states the # of messages in the folder.