public static void Execute(Job job, Agent implant) { Task task = job.Task; string computer = task.parameters.Trim(); if (string.IsNullOrEmpty(computer)) { computer = Environment.GetEnvironmentVariable("COMPUTERNAME"); } try { var results = ADUtils.GetLocalGroups(computer); job.SetComplete(results); } catch (Exception ex) { job.SetError($"Failed to get local groups. Reason: {ex.Message}"); } }