IT Automation Activities for Microsoft Exchange Server


This activity is now available on the Official Stable Feed:

Learn more about it here :point_down:


UiPath.ExchangeServer.Activities package offers administration activities for Microsoft Exchange Server 2016 and 2019 (on-premises).

Microsoft Exchange Server is a mail and calendaring server developed by Microsoft. The provisioning of Exchange mailboxes for users is a common request for IT departments. Offering activities that create and delete Exchange mailboxes, as well as enable and disable archiving for existing mailboxes, will enable IT Departments to easily automate these actions in their (RPA) workflows.


  • Exchange Management Shell must be installed on the Exchange Server.
  • The machine where these activities are running should be domain-joined with the Exchange Server, and access should be available (FQDN of the Exchange Server should be known/resolved by the robot machine).

Example of Scenarios to Automate

Listed below are two scenarios where Exchange Server activities will be very helpful, especially when used together with UiPath’s Active Directory Domain Services activities pack described here:

Employees Onboarding

When a new employee is hired in a company, the HR department provides the input for a UiPath automation process which creates a corresponding new user account in Active Directory (AD), generates a random password for it and sets it to expire after the first login, adds the user account to a list of specified groups, and creates an Exchange mailbox associated with this user account.

Employees Offboarding

When an employee leaves the company, the associated AD user account is removed from the groups it belongs to, the associated Exchange mailbox is deleted, and the AD user account is disabled.

Activities List

Exchange Server Scope – Provides a scope for Exchange Server activities.

Create Mailbox – Creates a new mailbox for an existing Active Directory user account.

Delete Mailbox - Deletes the mailbox for a specified Active Directory user account.

Enable Mailbox Archive - Enables the archive for the specified mailbox.

Disable Mailbox Archive - Disables the archive for the specified mailbox.

How to install

UiPath.ExchangeServer.Activities package is available in Beta feed. Please follow the steps below to install the package in UiPath Studio:

  • If you haven’t already, add the UiPath Beta feed to your Studio Manage Package window.
  • In the Beta feed, check ‘Include Prerelease’, search for “UiPath.ExchangeServer.Activities”, and install the latest BETA version (we do not recommend using alpha versions).
    Important - We must reiterate, make sure you check the ‘Include Prerelease’ checkbox :blush:

The Exchange Server Activities should be visible now in UiPath Studio, as shown below:

How to use

Employees Onboarding

A UiPath workflow that processes an Excel file containing a list of new employees. For each employee it does the following:

  • Creates and enables a new AD user account by setting the following attributes: givenName, sn, telephoneNumber, physicalDeliveryOfficeName, department, title, and manager.

  • Forces the user to change password at the next login.

  • Adds the user to the specified AD groups.

  • Creates an Exchange mailbox associated with the new AD user account. (30.9 KB)

Employee Offboarding

A UiPath process that removes a specified user account from all the groups it belongs to, deletes the associated Exchange mailbox, and disables the account. The process has one input parameter called UserAccount. Its value shall be a valid SAM Account Name. (14.3 KB)

To exemplify, let’s go step by step through the process of creating the Employee Offboarding automation process:

  1. Follow the steps described in Employee Offboarding section of the forum post about Active Directory Domain Services available here: IT Automation Activities for Active Directory Domain Services

  2. Create two Assets in Orchestrator. They will be used later in Exchange Server Scope activity:

  • ExchangeServer_Address – the FQDN (Fully Qualified Domain Name) of the Exchange Server.
  • ExchangeServer_AdminCredentials – the Exchange Server administrator user credentials.
  1. Retrieve the values of ExchangeServer_Address and ExchangeServer_AdminCredentials assets, using Get Asset and Get Credentials Orchestrator activities. The values of these assets are stored in exchangeServer, exchangeUsername, and exchangePassword variables.

  2. Add the Exchange Server Scope activity and set the values for the required input parameters:

  • ExchangeServerAddress (String) - The FQDN of the Exchange Server, i.e. exchangeServer.

  • Username (String) - The user that will perform Exchange Server operations, i.e. exchangeUsername.

  • Password (SecureString) - The password for the provided Username, i.e. exchangePassword.

  1. Finally, add Delete Mailbox activity to remove the Exchange mailbox associated with the AD user account. This activity requires the User Principal Name of the AD user account as input parameter. To obtain the value of “userPrincipalName“ attribute, use Get Object Properties activity from UiPath.ActiveDirectoryDomainServices.Activities package.

  2. That’s all folks! You can run the process from UiPath Studio or publish it in Orchestrator and create a Job in order to execute it. Enjoy :blush:


Hi @ovidiuponoran,
You are rocking. I think you are the master in the server side components. :clap::clap::clap::clap::clap:


Thanks @balupad14 for your kind words!

We believe these IT activities enable IT Departments to easily automate most critical IT operations, so we are a very enthusiastic team making this happen.

New IT Automation activities packages will be available soon, e.g. for Azure, Citrix :slight_smile:

1 Like

Yes. it is true. Inside preview also mentioned that the Azure and Citrix activities will be on soon. Great job. UiPath is making the Automation very cool and easy like you people that making new activities. .Congratulations


To disable inactive user accounts in active directory you need to save queries. You can do it by going for the following steps. Remember that the saved queries in Active Directory Users and Computers are utilized to make simple and tough LDAP search filters. To save them just open Active Directory Users and Computers and you Right click the option that says Saved Queries and choose New Query. Try to know more methods about disabling user accounts in active users directory. Now give the query a name and press the Define Query button. You can name your query Disabled Users. Now on the Find Common Queries box tap the Disable Accounts box and press ok. Here the query string box should now be populated with the LDAP syntax so just tap OK and press on the Disabled Users query under Saved Queries. At the end you should now see all the disabled accounts. Now whenever you open AD you will find these saved query so you can find disabled accounts whenever it is needed.