Orchestration Exchange Activities

From ServiceNow Wiki
Home > Deliver > IT Operations Management > Orchestration > Orchestration Activities > Orchestration Exchange Activities
Jump to: navigation, search
Orchestration
Related Topics
Knowledge.gif Get the Book

1 Overview

Exchange activities allow workflows to manage Microsoft Exchange mail systems. ServiceNow can interact with Microsoft Exchange 2010 and 2013 running on premise. These activities cannot be used to interact with Microsoft Exchange Online.

Orchestration Exchange activities require the following:

  • Your ServiceNow instance must have access to a MID Server configured to use PowerShell 2.0 to run these activities. This MID Server must be in the same Active Directory domain as the Exchange server.
  • The Microsoft Exchange server must have remote Powershell capabilities enabled. For details, see Enable-PSRemoting.

Exchange activities are included with Orchestration starting with the Eureka release.

2 Configuring a MID Server for Exchange

If the MID Server manages resources within defined IP ranges, instead of all computers on your network, you must perform additional configuration steps to run Exchange activities. You do not need to perform these steps if your MID Server uses the default configuration.

To configure a MID Server with defined IP ranges to use Exchange activities:

  1. Enter cmdb_ci_dns_name.list in the navigation filter.
  2. Click New.
  3. Enter the fully-qualified domain name (FQDN) of your Exchange server in the Name field.
  4. Right-click the form header and select Save.
  5. In the IP Address related list, click New.
  6. In the IP Address field, enter the IP address of your Exchange server.
  7. In the Nic field, select eth0 or your preferred network interface controller.
  8. Leave the Netmask field blank.
  9. Click Submit.

3 Shared Input Variables

All Exchange activities share these activity input variables. Some activities use other input variables in addition to these shared input variables.

Field Description
Hostname The hostname of the Exchange server the activity interacts with. Do not enter an IP address in this variable.
Domain The name of the Windows domain the Exchange server is assigned to.
Optional parameters Optional parameters to pass to the Exchange server written in JavaScript Object Notation (JSON). Available parameters vary for each activity based on the Exchange command that activity implements. For example, to set the size limit and warning quota for mail, enter {"MaxSendSize":"2097152","IssueWarningQuota":"209715200"}. Exchange activities cannot pass parameters that reference an object, such as a PSCredential object. Plain text is automatically converted to SecureString objects for parameters that require that data type.

When passing a switch parameter, such as ForceUpgrade, you must use the format "parameter":"true".

Attempting to save an activity that specifies duplicate parameters, including parameters from activity variables, or incorrectly formatted JSON causes a warning message to appear.

4 Passing Multivalued Properties

The Optional parameters shared input variable allows you to set multivalued properties. To set a multivalued property using an Exchange activity, you must use a specific parameter format.

  • To set a multivalued property, replacing any existing values, use this format: "PropertyName":"(value1, value2, value3)"
  • To add values, use this format: "PropertyName":"+(value1, value2, value3);"
  • To remove values, use this format: "PropertyName":"-(value1, value2, value3);"
  • To both add and remove values, use this format: "PropertyName":"-(value1, value2, value3);+(value1, value2, value3);"

Depending on the type of the multi-value object, each value might need to be enclosed by single quotes, following the format "PropertyName":"+('value1', 'value2', 'value3');". Email address values for example do not require quoting, but if the multi value type is a string and the string contains a space, then it is necessary to enclose the string by single quotes in order to preserve the space character.

5 Create AddressList

The Create AddressList activity creates a new address list that acts as an alias for emailing all users in the group. This alias cannot be used to manage user permissions. This activity implements the Microsoft Exchange New-AddressList command.

5.1 Scratchpad Entries

The activity stores information about the created address list in the addressList variable as an array of JavaScript objects. See the Microsoft AddressList class documentation for available fields.

5.2 Input Variables

Field Description
Name The name of the new address list to create.

6 Create Mailbox

The Create Mailbox activity creates a new Active Directory user and mailbox for the user. Enter the new user's information in the activity input variables. This activity implements the Microsoft Exchange New-Mailbox command.

Note
Note: The Create Mailbox activity only supports MID servers that are in the same domain as the Exchange server.

6.1 Scratchpad Entries

The activity stores information about the created mailboxes in the mailboxes variable as an array of JavaScript objects. See the Microsoft Mailbox class documentation for available fields.

6.2 Input Variables

Field Description
First name The first name of the new user.
Middle initial The middle initial of the new user.
Last name The last name of the new user.
Alias The display name for the mailbox address, the part of the email address to the left of the @ symbol. If no alias is specified, the activity uses First name.Last name as the alias. The alias is also used as the user principal name (UPN) if none is specified in the Optional parameters.
User password The desired password to log in to the account.

7 Delete AddressList

The Delete AddressList activity removes an existing address list. This activity implements the Microsoft Exchange Remove-AddressList command.

7.1 Input Variables

Field Description
Identity The name of the address list to remove.
Domain controller The fully-qualified domain name of the domain controller that writes to Active Directory.
Recursive A check box that indicates if the activity should delete Active Directory elements that are children of the specified address list.
What if A check box that indicates if the activity should stage the changes without applying them. Use this variable to test your activity settings before using the activity in a live workflow. When this variable is selected, the Exchange server does not make any changes but indicates if the command would succeed or fail. You can review any messages from the Exchange server using the ECC Queue.

8 Delete Mailbox

The Delete Mailbox activity deletes an Active Directory user associated with a mailbox. Optional parameters determine how the Exchange server handles the mailbox after deleting the user. This activity implements the Microsoft Exchange Remove-Mailbox command.

8.1 Input Variables

Field Description
Exchange user The Active Directory user to delete. The activity passes this value to Exchange as the Identity Exchange variable.

9 Disable Mailbox

The Disable Mailbox activity disables the mailbox associated with a specified Active Directory account. This activity implements the Microsoft Exchange Disable-Mailbox command.

9.1 Input Variables

Field Description
Exchange user The Active Directory user who's mailbox should be disabled. The activity passes this value to Exchange as the Identity Exchange variable.

10 Enable Mailbox

The Enable Mailbox activity creates a new mailbox for an existing Active Directory user. This activity implements the Microsoft Exchange Enable-Mailbox command.


10.1 Scratchpad Entries

The activity stores returned information about the address lists in the addressList variable as an array of JavaScript objects. See the Microsoft AddressList class documentation for available fields.

10.2 Input Variables

Field Description
Exchange user The Active Directory user to create a mailbox for. The activity passes this value to Exchange as the Identity Exchange variable.

11 Get AddressList

The Get AddressList activity retrieves all attributes from the specified address list. This activity implements the Microsoft Exchange Get-AddressList command.

11.1 Input Variables

Field Description
Container The parent address list of the address list you want to retrieve attributes from. If you enter a value in this variable, leave the Identity and Search text variables blank.
Domain controller The fully-qualified domain name of the domain controller that writes to Active Directory.
Identity The name of the address list to get attributes from. If you enter a value in this variable, leave the Container and Search text variables blank.
Organization The organization the specified address list belongs to.
Search text Filter text that causes the activity to return only results that contain this text. This variable can only be used with Exchange 2013 servers. If you enter a value in this variable, leave the Container and Identity variables blank.

12 Get Mailbox

The Get Mailbox activity gets the mailbox for the specified user, or all mailboxes on the Exchange server. This activity implements the Microsoft Exchange Get-Mailbox command.

12.1 Scratchpad Entries

The activity stores the retrieved mailbox information in the mailboxes variable as an array of JavaScript objects. See the Microsoft Mailbox class documentation for available fields.

12.2 Input Variables

Field Description
Exchange user The user whose mailbox this activity should get. If no user is specified, the activity gets all mailboxes on the Exchange server. The activity passes this value to Exchange as the Identity Exchange variable.

13 Move AddressList

The Move AddressList moves an address list to another location in the address hierarchy. This activity implements the Microsoft Exchange Move-AddressList command.

The Exchange server caches the changes from this activity but does not immediately apply them. Use the Update AddressList activity after this activity to apply the changes or wait for the Exchange server to automatically apply cached changes.

13.1 Input Variables

Field Description
Identity The name of the address list to move.
Target The path to move the address list to.
Domain controller The fully-qualified domain name of the domain controller that writes to Active Directory.
What if A check box that indicates if the activity should stage the changes without applying them. Use this variable to test your activity settings before using the activity in a live workflow. When this variable is selected, the Exchange server does not make any changes but indicates if the command would succeed or fail. You can review any messages from the Exchange server using the ECC Queue.

14 Set AddressList

The Set AddressList modifies the specified address list. Use the Optional parameters variable to pass specific values to the Microsoft Exchange server. This activity implements the Microsoft Exchange Set-AddressList command.

The Exchange server caches the changes from this activity but does not immediately apply them. Use the Update AddressList activity after this activity to apply the changes or wait for the Exchange server to automatically apply cached changes.

14.1 Input Variables

Field Description
Identity The name of the address list to modify.

15 Set Mailbox

The Set Mailbox activity sets a value or setting for an existing mailbox. Use the Optional parameters variable to pass specific values to the Microsoft Exchange server. This activity implements the Microsoft Exchange Set-Mailbox command.

15.1 Input Variables

Field Description
Exchange user The Active Directory user whose mailbox you want to modify. The activity passes this value to Exchange as the Identity Exchange variable.

16 Update AddressList

The Update AddressList activity adds or removes users from the specified address list and immediately applies any cached AddressList changes to the server. Use the Optional parameters variable to specify which users to add or remove. This activity implements the Microsoft Exchange Update-AddressList command.

16.1 Input Variables

Field Description
Identity The name of the address list to update.
Domain controller The fully-qualified domain name of the domain controller that writes to Active Directory.
What if A check box that indicates if the activity should stage the changes without applying them. Use this variable to test your activity settings before using the activity in a live workflow. When this variable is selected, the Exchange server does not make any changes but indicates if the command would succeed or fail. You can review any messages from the Exchange server using the ECC Queue.
Was this article helpful?
Yes, I found what I needed
No, I need more assistance