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.
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