Get AD Users with Orchestrator

This Runbook will get all Active Directory (AD) users from a specific Organizational Unit (OU) location and pass them forward in the Runbook.

To try this Runbook you need to install the Integration Pack (IP) “Orchestrator Integration Pack for PowerShell Script Execution 1.1” and enable WinRM on the Runbook server and the Domain Controller (DC) that you will execute the “Get AD Users” activity on.

This is the small Runbook that I will execute to get the Users from AD.

Get AD Users with Orchestrator2

The activity “Get AD Users” looks like the picture below and the input for PS Script 01, which gets the users, is:

Import-Module ActiveDirectory; Get-ADUser –Filter * -SearchBase “OU=LAB,DC=LAB,DC=INTRA” | Select-Object –expand SamAccountName

Get AD Users with Orchestrator1

One Response to Get AD Users with Orchestrator

  1. Chris August 1, 2016 at 20:11 #

    Jonathon, I attempted a similar script for Computer Names, but when I ran this (after getting me PS syntax correct) I get a blank line in the append lines file it creates. Here is my PS:
    Import-Module ActiveDirectory; (get-adcomputer {Old Computer Name from “Initialize Data”}–properties memberof | select-object memberof).memberof

Leave a Reply