jukedude Thanks for the IIS Core Module stuff, would this allow to whitelist an entire domain? (eg: *.myADdomain.local, not just PC1.myADdomain.local). I am currently upgrading my PC so it would be a bummer to have CORS work for my old PC and not work for my new PC, just because it is hardcoded to my old PC name? (I installed not too long ago so things are fresh in my mind but imagine a year down the line...)
Is there somewhere an official "dummed down for sysadmins who are not devs" version of the IIS Cors module we could have?
Chris4870 I am not a dev (at all!) but, you may want to use Fiddler to capture the HTTP traffic while using the new console. Would ease the analysis. In the meanwhile here's what I have found so far (using PowerShell):
$OrchURI = 'http://OrchServerFQDN:5001' #Replace 5001 by the WebService port
$JobID = '00000000-0000-0000-0000-000000000000' # Correct job ID of course, you can list all jobs to search by name later on or maybe there can be filtered...
# To list all Runbook Servers
$RunbookServers = @(Invoke-RestMethod -Uri ('{0}/api/RunbookServers' -f $OrchURI) -UseDefaultCredentials | Select -ExpandProperty value | Select -ExpandProperty Name)
# To list all Jobs currently running
$CurrentJobs = Invoke-RestMethod -Uri ('{0}/api/Jobs?$filter=Status%20in%20(%27Running%27,%27Pending%27)&$expand=Runbook($select=Name),RunbookInstances' -f $OrchURI) -UseDefaultCredentials | Select -ExpandProperty value
# To list all available Runbooks
Invoke-RestMethod -uri ('{0}/api/Runbooks' -f $OrchURI) -UseDefaultCredentials | Select -ExpandProperty value
# To Stop a job
Invoke-RestMethod -Uri ('{0}/api/jobs/{1}' -f $OrchURI,$JobID ) -UseDefaultCredentials -Method Patch
# To Start a job
$body = @{
RunbookId = $JobID
RunbookServers = $RunbookServers
Parameters = @() # Assume we could put the parameters here, never went past this section
CreatedBy = $null
} | ConvertTo-Json
Invoke-RestMethod -Uri ('{0}/api/Jobs' -f $OrchURI) -Body $body -Method Post -ContentType 'application/json' -UseDefaultCredentials