This activity is now available on the Official Stable Feed:
Learn more about it here
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: https://forum.uipath.com/t/it-automation-activities-for-active-directory-domain-services-now-in-public-preview/129829
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.
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.
Active Directory 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
The Exchange Server Activities should be visible now in UiPath Studio, as shown below:
How to use
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.
EmployeeOnboardingPlusExchange.zip (30.9 KB)
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.
EmployeeOffboardingPlusExchange.zip (14.3 KB)
To exemplify, let’s go step by step through the process of creating the Employee Offboarding automation process:
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 - Now in Public Preview
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.
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.
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.
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.
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