Hello Scott,
For this purpose you can use Adaxes virtual properties. Such properties are not stored in AD, but can be used like any other properties of Active Directory objects.
You can add one of the virtual properties that can store boolean values (for example, CustomAttributeBoolean1) to the form used for creating users. Then, you can use a Business Rule. Adaxes Business Rules allow you to automatically perform certain actions once a certain event occurs in your AD. So, you can create a Business Rule triggered After Creating a User that will automatically launch the script for creating mailboxes every time a new user is created, provided that the virtual property that you chose (e.g. CustomAttributeBoolean1) is set True.
Also, you can modify the name for the virtual property that you chose and set it to anything you want, even a question.
To implement such a solution:
I. Modify Form for Creating Users
For information on how to add a property to the form for creating users, see step 6 in the following tutorial: http://www.adaxes.com/tutorials_WebInte ... tomization.
II. Create a Business Rule for Creating Mailboxes
To create a Business Rule that allows running your script based on the value of the CustomAttributeBoolean1 property:
- Create a new Business Rule.
- On the 2nd step of the Create Business Rule wizard, select User and After Creating a User.
- On the 3rd step, add the Run a program or PowerShell script action and paste your script in the Script field.
- Add a short description for the script and click OK.
- Right-click your action and click Add Condition.
- Select the If <property> <relation> <value> condition.
- Expand the <property> drop-down list.
- Select the Show all properties option.
- Select CustomAttributeBoolean1.
- Select equals and type True.
- Click OK and finish creation of the Business Rule.
III. Modify the Display Name of the Virtual Property
For information on how to modify the name under which the virtual property appears in Adaxes, see Customizing Display Names for AD Properties.