public ActionResult List(AssetViewModel viewModel)
 {
     try
     {
         PSRemoting        ps      = new PSRemoting(viewModel.ComputerName, config.FALCON_FORENSICS_USERNAME, config.FALCON_FORENSICS_PASSWORD, config.FALCON_FORENSICS_DOMAIN);
         ProcessManagement process = new ProcessManagement(ps);
         string            command = System.IO.File.ReadAllText(Server.MapPath("~/App_Data/Scripts/Get-ProcessListing.ps1"));
         List <Process>    model   = process.ListProcesses(command);
         ViewBag.ComputerName = viewModel.ComputerName;
         return(PartialView("_ProcessListing", model));
     }
     catch (Exception e)
     {
         return(PartialView("_Error", e.Message));
     }
 }
Пример #2
0
        internal static void ProcessList()
        {
            string subject = String.Format(SharedMethods.GetMailSubject(), " - ## Process list ## Of ### ");

            SharedMethods.SendMail(subject, ProcessManagement.ListProcesses());
        }