public string RemoveScheduledJobs(string id) { try { string[] jobs = new JavaScriptSerializer().Deserialize <string[]>(id); using (MyPowerShell ps = new MyPowerShell()) { ps.RemoveScheduledJobs(jobs).Invoke(); } return("[]"); } catch (Exception exc) { return(new JsonException(exc).ToString()); } }