Christopher_Mal
ServiceNow Employee
ServiceNow Employee

I have had this bit of information for sometime and I have to thank a customer and friends of mine I was working with about a year ago: Roy Walton and Tim Warren. They are the brains behind this blog.

If you are using ServiceNow Orchestration you probably know already that you can drag and drop Active Directory activities into a workflow and do some basic task (like reset password, update AD user accounts, create AD user accounts, etc). It may also be helpful for you to write your own Powershell script. There is an activity for that.

If you want to leverage the AWESOME CMDLETS Microsoft provides in your Powershell you have to modify your MID server to include the libraries. Using these CMDLETS can really facilitate AD management when you get to know them. I am not the expert when it comes to AD administration - so if anyone has more to add to this blog - I'd be grateful.

Here are the steps to take on your MID server so the AD CMDLETS are available:

1. Go to "Server Manager"
2. Right click on Features and select Add Features
3. Scroll down to "Remote Server Administration Tools" and click the +
4. Find "Role Administration Tools" and click the plus
5. Find "AD DS and AD LDS Tools" and click the plus
6. Select the checkbox called "Active Directory Module for Windows PowerShell"
7. Install

FOR MS EXCHANGE:
Similarly, for Exchange 2010, you have to run Add-PSSnapin Microsoft.Exchange.Management.PowerShell.E2010 (and have the Exchange 2010 admin tools installed on the MID server).

Before writing your Powershell now you will need to import the modules for active directory using:

Import-Module ActiveDirectory

For reference here is the documentation for the AD CMDLET API as well:
http://technet.microsoft.com/en-us/library/ee617195.aspx

6 Comments