Runbook design best practicesFlow controlPublishing dataLogging execution dataLoopingSequential vs. parallel activity executionSetting job concurrencyUsing Windows PowerShell in OrchestratorWindows PowerShell remotingSubscribe to Published DataSet trace and status variables to defaultsValidate inputsEstablish PS remote sessionExecute script in remote sessionUse try/catch/finallyAppend useful data to the Trace variableAdd any required Windows PowerShell modulesUse throw for common errorsPerform core task logicSet ErrorState and ErrorMessageReturn resultsPrep data for Orchestrator PublishingClose remote sessionPutting it all togetherReturning arraysRunbook patternsComponent runbook patternRulesError handlingValidation of input parametersRange validation (1-12):Enum validation (blue, red):Email address validation:Date validation:IP address validation:Control runbook patternRulesError handlingValidation of input parametersConnectivity runbookInitiation runbooksRulesError handlingService requests initiation runbooksFile-based runbook variablesLocal runbook variablesShared runbook variablesFile-based state patternWorking with XML in Windows PowerShellCreating the fileNon-exclusive read/writeExclusive read/writeFile open pattern for file locksDelete fileLocal state patternShared state and routing/engine patterns