how can i shutdown a remote computer using C# ,i have tried to do it in command prompt it works fine but when i tried to integrate it to my c# code i get an error targetInvocationException was unhandled
program.cs
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form1());
-this is where error is located
form1.cs
System.Diagnostics.Process.Start("shutdown -s -f -t 60 -m\\192.168.23.18");
this the line of code i wanted to use