Getting Started << >>

User Authorization to Run and Create Scripts

A poorly written script can damage data on a server or consume server resources. For this reason, you should control who is allowed to run or create scripts on your server. For example, you should allow only trusted application developers to work with scripts. To prevent scripts from having unlimited access to your server, the Scripting Agent runs the script using the mailbox identity of the last user who saved the script. This means that the script does not have permissions to do anything more than the script author.

Granting Users Permissions to Run Scripts

To create, edit or save scripts, a user must be the folder owner of the target application folder where the events are being run. For agents to be run, folder owners must have permission to configure events on the server. The following procedure describes how to grant permissions to folder owners to run scripts.

  1. In the Administrator window, select the System Folders container for your organization.
  2. Select Events Root, and then select the EventConfig folder that corresponds to the Microsoft Exchange Server computer on which the folder owner should be granted permission.
  3. From the File menu, choose Properties.
  4. Choose Client Permissions.
  5. Choose Add, and then select the user who will have permission to run applications or other event handlers on this server.
  6. In the Roles box, select the Author role. This enables the user to create new events on this server. Users can also modify and delete events that they have created; however, they cannot modify or delete events created by other users.

Creating a New Script with Microsoft Outlook Version 8.03 and Later

Microsoft Outlook enables users to create, edit, and save scripts by using the Microsoft Exchange Scripting Agent. By default, Outlook starts Notepad so that you can edit scripts. If a user has installed Microsoft Visual InterDev(tm), which is included with Microsoft Visual Studio(tm), it can be used as the script editor.

Note   To create, edit, or save scripts, you must have the appropriate permissions. For more information, see "Granting Users Permissions to Run Scripts" earlier in this chapter.

  1. In Outlook, select the personal folder or public folder where you want to run a script.
  2. From the File menu, choose Properties.
  3. Select the Agents tab, and then choose New.
  4. Specify a name for the new agent.
  5. Select the events that the agent should respond to. For example, select A new item is posted in this folder to enable the agent to respond when a new item is posted.
  6. Choose Edit Script. If Microsoft Visual InterDev is installed, it is started with a blank script that you can edit. If it is not installed, Notepad is started with a blank script.
  7. After you finish editing the script, save it and then quit Visual InterDev or Notepad.
  8. Choose OK to save your new agent.