Hey Guys,
Thanks a lot for the valuable comments on the API - helped a lot to force PS to cooperate with various endpoints.
Based on the above comments, this request body was accepted by the API - the RB starts correctly:
$body = @{
RunbookId = $runbookId
RunbookServers = @($runbookServer)
Parameters = @(
[pscustomobject]@{Name='Test_param1';Value='test 1_2_3'},
[pscustomobject]@{Name='Test_param2';Value='The value of the 2nd parameter'}
)
CreatedBy = $null
} | ConvertTo-Json
#Start RB
Invoke-RestMethod -Uri "$($SCORCHAPIUri)/api/Jobs" -Body $body -Method Post -ContentType 'application/json' -UseDefaultCredentials
Notice that the RBServers parameter is declared as an array - it would not work without the '@'.
I've been trying to install the UR1 recently, seeing a weird issue. Regardless of the source for the updates (Windows Update or MS Update Catalog), it seems that the Runbook Server MSP package is mutually exclusive with the Management Server MSP package.
When one is installed (either the Runbook Server UR1 patch or the Management Server UR1 patch), the installation of the other cannot complete. It ends up with a 1603 error (MSI log) or 0x80070643 (Windows Update).
Molish Any hints on what could be the reason, or maybe this is intended to happen (ie. the Management Server patch contains the contents of the Runbook Server)?
In my environment, all the SCORCH roles except the SQL DB are located on the same machine.
Much obliged for any comments!