O'Reilly logo

Microsoft System Center Designing Orchestrator Runbooks by Aaron Cushner David Ziembicki Andreas Rynes, Mitch Tulloch

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Appendix A. Windows PowerShell source code for core component runbooks

Get Runbook Path

$Url = "{Orchestrator Web Service URL from "Initialize Data"}" $ActivityID = "{Runbook Activity ID from "Initialize Data"}" $RootPath = "{Root Path from "Initialize Data"}" $ErrorState = 0 $ErrorMessage = "" $Action = "Get Runbook Path" $Trace = "Begin '$Action' `r`n" try { $Trace += "Calling Get-ActivityRunbookPath with URL '$Url' and ActivityID '$ActivityID'. `r`n" if(!($Url.EndsWith('/') -Or $Url.EndsWith('\'))) { $Url += "/" } $Url = $Url + "Activities(guid'$ActivityID')/Runbook" $Trace += "Completed URL: $Url `r`n" $URI = New-Object System.Uri($Url,$true) $counter = 0 $max = 6 $completed = $false while ($counter -le $max -and !$completed) { try { $counter ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required