28 C
Dubai
Saturday, November 23, 2024

How to apply a Policy or Mailbox Settings automatically while Creating a mailbox in Exchange 2010

Lets say I want to apply something default when I Create mailbox in my organization

Its bit easy to do using scripting agents

In this example I am applying Address book policy for newly created users automatically , you can add some more commands as per your requirement

Step 1:

Copy the Below Code

<?xml version=”1.0″ encoding=”utf-8″ ?>
<Configuration version=”1.0″>
<Feature Name=”MailboxProvisioning” Cmdlets=”new-mailbox,enable-mailbox”>
<ApiCall Name=”OnComplete”>
if($succeeded) {
Set-Mailbox $provisioningHandler.UserSpecifiedParameters[“Alias”] –AddressbookPolicy “Policy Name
}
</ApiCall>
</Feature>
</Configuration>

Step 2:

Save as “ScriptingAgentConfig.xml

Step 3:

Copy the File in the below location

Default: “C:\Program Files\Microsoft\Exchange Server\V14\Bin\CmdletExtensionAgents”

Step 4:

Enable-CmdletExtensionAgent "Scripting Agent"

image

Now Try creating a mailbox . It should apply the address book policy automatically

In the Same Format you can add some more commands or you can replace the existing ones

For Sample Code you can check in the Below location

C:\Program Files\Microsoft\Exchange Server\V14\Bin\CmdletExtensionAgents\ScriptingAgentConfig.xml.sample

 

Satheshwaran Manoharan
Satheshwaran Manoharanhttps://www.azure365pro.com
Award-winning Technology Leader with a wealth of experience running large teams and diversified industry exposure in cloud computing. From shipping lines to rolling stocks.In-depth expertise in driving cloud adoption strategies and modernizing systems to cloud native. Specialized in Microsoft Cloud, DevOps, and Microsoft 365 Stack and conducted numerous successful projects worldwide. Also, Acting as a Technical Advisor for various start-ups.

Related Articles

5 COMMENTS

  1. Hi Satheshwaran,
    Your tutorials helped very much in my migration from Exchange Server 2003 > 2010.
    I have a question, I think others will find it useful to have the answer to.
    There are many more services in Exchange 2010 (and probably 2013?).
    Is there a list somewhere that identifies the functions of all these new services and, are there any that do not actually need to be enabled in a single server configuration with CAS, MBOX, HUB

    • I don’t think there is a list as such . default configurations should make things work . which is required for a single server configuration

  2. Hi Satheesh,

    Is there a possible way to add a set of Existing Distribution group while creating a New mailbox if so where i need to change the pattern in the script line.

    Please help me out.

    Thanks in Advance.

    Regards,
    Aravind.M

  3. Hello

    I have enabled the exchange cmdlet agent scripting in my organization so whenever we create or enable a new user his/her Activesync feature gets disabled. However, we discovered that the command is not executed only when running new-mailbox or enable-mailbox but it executes when we move a mailbox from a database to another which we don’t want. because users in ActiveSync_enabled group should have their ActiveSync feature enable all the time.

    do you have any solution for that?

    Cheers
    Omar

LEAVE A REPLY

Please enter your comment!
Please enter your name here

× How can I help you?