Update EmployeeID in AD using Orchestrator Runbook RRS feed

  • Question

  • Hello,

    I created runbook using "Create User" from AD IP to create user in AD. I added powershell script next to create user to update the employee id 

    Import-module ActiveDirectory  

    $User =SAM Account Name
    $ID = EmployeeID
    Set-ADUser $User -employeeID $ID 

    runbook completed without any errors, i can see the user created in AD but employee id is not getting updated.

    please help me to fix this.



    Wednesday, July 22, 2020 4:24 PM

All replies

  • Hi,

    Have you first verified if the PowerShell script work if you run it manually from the Orchestrator server?

    Also how are you running the Runbook? From the "Run" button in the Runbook Designer, from the Orchestrator Console (web), or are you testing with the Runbook Tester?

    If you are testing with the Runbook Tester, note that it will not use the Orchestrator service account, it will run with your logged in account, this is the difference from running with "Run" or the Orchestrator Console (web).

    Also, the Orchestrator Run .Net Script executes PowerShell version 2 by default, where the Active Directory cmdlets will not work, you can use the workaround mentioned by Stefan here:

    Best regards,

    Blog: https://thesystemcenterblog.com LinkedIn:

    Wednesday, July 22, 2020 8:34 PM
  • Hi,

    not sure why you use the brackets ({})?

    Without the brackets you'll probably get an error because the UserID ot employeeId is not in quotes or the account running Orchestrator Runbook Service has no permissions.



    More and news about System Center at stillcool.de and sc-orchestartor.eu .

    Thursday, July 23, 2020 3:55 PM
  • Thanks for your response, i will test it. Now i'm facing another issue, i couldn't able to check in the runbook.

    It throws an popup "the runbook contains multiple starting activities", cannot start the runbook.

    Could you please help?



    Friday, July 24, 2020 2:12 PM