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.
- In the Administrator window, select the System Folders container for your organization.
- 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.
- From the File menu, choose Properties.
- Choose Client Permissions.
- Choose Add, and then select the user who will have permission to run applications or other event handlers on this server.
- 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.
- In Outlook, select the personal folder or public folder where you want to run a script.
- From the File menu, choose Properties.
- Select the Agents tab, and then choose New.
- Specify a name for the new agent.
- 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.
- 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.
- After you finish editing the script, save it and then quit Visual InterDev or Notepad.
- Choose OK to save your new agent.