This recipe will describe different methods of error handling in a Runbook. The current recommended practice is to ensure you implement error handling in all your Runbooks. Typical reasons why errors occur are incorrectly typed inputs and missing expected inputs.
In this recipe, you will enhance the recipe Add User To Group In AD you created in Chapter 4, Creating Runbooks for Active Directory Tasks, to include error handling.
The preparation for this recipe requires you to create the Adding users to groups in Active Directory Runbook described in Chapter 4, Creating Runbooks for Active Directory tasks.
The Runbook should look like and be called:
"Add User To Group In AD"
You must also define ...