Runbook Tester vs Run in Runbook Designer vs Run in Orchestrator Console

Ronald Seow 206 Reputation points
2020-08-25T03:49:57.04+00:00

Hi! Everyone,

I have hit another brick wall, but as usually, I'm clueless and hope I can get some knowledge here.

I have completed the creation of a Runbook to unlock AD User accounts following the workflow attached. The steps includes;

  1. Initialize Data - Get user input for AD User login ID
  2. Run .Net Script (Powershell) - Check Input for null value in entry
  3. Run .Net Script (Powershell) - Check whether Inputted user login ID user object exist in AD
  4. Run .Net Script (Powershell) - Check whether Inputted user login ID user object is enabled and lockout status is true
  5. Run .Net Script (Powershell) - Check whether Inputted user login ID user object is in the same AD Group as the Runbook user
  6. Run .Net Script (Powershell) - Unlock Inputted user login ID

I test run this Runbook in 3 ways;

  1. Runbook Tester - Completed successfully
  2. Using Run in Runbook Designer - Failed, no pop-up screen to request for input
  3. Using Run in Orchestrator Console - Failed, while executing the below script less the quotes

"$CurrentUserGroupObj = Get-ADUser -Identity $CurrentUser -Properties MemberOf"

19959-sco-runbook-full-flow-for-unlock-ad-user.jpgCan someone shed some light what is going on?

Thank you and best regards.
Ronald

System Center Orchestrator
System Center Orchestrator
A family of System Center products that provide an automation platform for orchestrating and integrating both Microsoft and non-Microsoft IT tools.
217 questions
{count} votes

17 additional answers

Sort by: Most helpful
  1. Ronald Seow 206 Reputation points
    2020-08-27T00:01:16.537+00:00

    Hi! XinGuo / Andreas / Leon / Stefan,

    Good morning to all. Thank you once again for replying to my questions.

    The objective of this "Group Check" is actually to determine if the user running this particular Runbook is the administrator for the account he is unlocking. IHence, we have not hardcoded the CurrentUser. Is there a way to get the Runbook user account in this case? If I were to configure the Services to Run As the Administrator, then this check will not serve any purpose then.

    Thank you and appreciate any advice.

    Best regards.
    Ronald

    0 comments No comments

  2. Ronald Seow 206 Reputation points
    2020-08-27T01:56:08.643+00:00

    Hi! Everyone,20520-get-user.txt

    I have tried a few methods as per attached text file.

    I am not too sure how to use or whether invoke powershell will work in my case and the other being the $output=powershell{} -args.

    Is there really no solution to this?

    Thank you for any kind advise.

    Best regards.
    Ronald


  3. Ronald Seow 206 Reputation points
    2020-08-27T02:49:42.987+00:00

    Hi XinGuo,

    I am checking whether our infra has an existing SCSM. In the meantime, may I know if this is the only solution or there are other solutions. I know I can get the user to also enter their username but trying not to resort to this method for now.

    Thank you and best regards.
    Ronald


  4. Ronald Seow 206 Reputation points
    2020-08-27T07:04:50.153+00:00

    Hi! XinGuo,

    Thanks for your reply. Noted with thanks.

    Best regards.
    Ronald

    0 comments No comments