protected override void ProcessRecord() { switch (ParameterSetName) { case "SingleJob": WriteObject(SCOrch.getJobDetails(sco, job.job.Id)); break; case "Runbook": if (string.IsNullOrEmpty(jobStatus)) { foreach (JobInstance ji in SCOrch.getRunbookJobInstances(sco, runbook.Id, LoadJobDetails.IsPresent)) { WriteObject(ji); } } else { foreach (JobInstance ji in SCOrch.getRunbookJobInstances(sco, runbook.Id, jobStatus, LoadJobDetails.IsPresent)) { WriteObject(ji); } } break; case "AllJobs": if (string.IsNullOrEmpty(jobStatus)) { foreach (JobInstance ji in SCOrch.getAllJobs(sco, LoadJobDetails.IsPresent)) { WriteObject(ji); } } else { foreach (JobInstance ji in SCOrch.getAllJobs(sco, jobStatus, LoadJobDetails.IsPresent)) { WriteObject(ji); } } break; case "RunbookServer": if (string.IsNullOrEmpty(jobStatus)) { foreach (JobInstance ji in SCOrch.getAllJobInstancesOnRunbookServer(sco, runbookServer, LoadJobDetails.IsPresent)) { WriteObject(ji); } } else { foreach (JobInstance ji in SCOrch.getAllJobInstancesOnRunbookServer(sco, runbookServer, jobStatus, LoadJobDetails.IsPresent)) { WriteObject(ji); } } break; default: break; } }