I sometimes get the question if it is possible to use a PowerShell module in the out-of-the box activities in Orchestrator. The answer to the question is – yes off course. Just remember to deploy the module to every Runbook server that is going to run the Runbook that is using the module.
I will below show an example where I am creating an AD user by using the “Run .Net Script” activity in Orchestrator together with the “Active Directory module for Windows PowerShell” in Server 2008 R2.
This is a very easy Runbook that only will create an AD User.
The “Run .Net Script” activity looks like this.
Remember that the Runbook will execute under the Orchestrator Service account and therefore it will need rights to create the user, in this example. In the “Run .Net Scripts” activity it is not possible to execute the activity under an account other than the Runbook Service account.
Therefore I would recommend, when creating a user by PowerShell, to use an Orchestrator Integration Pack that can execute PowerShell with a user account that only have access to create AD users.