Kill process on remote machine
问题 I'm trying to kill a process on a remote machine. But I get error. What am I doing wrong and how can I make this work? My code: var iu = new ImpersonateUser(); try { iu.Impersonate(Domain, _userName, _pass); foreach (var process in Process.GetProcessesByName("notepad", "RemoteMachine")) { string processPath = pathToExe; //Is set as constant (and is correct) process.Kill(); Thread.Sleep(3000); Process.Start(processPath); } } catch (Exception ex) { lblStatus.Text = ex.ToString(); } finally { iu