title: Remote shutdown PC using C# windows form?
body: <p>I'm trying to shutdown PC remotely programmatically using c# via command prompt and I already done a few search and found out this kind of codes.</p>
  
  <pre><code>System.Diagnostics.Process.Start("shutdown", "/s");
  </code></pre>
  
  <p>And since it doesn't spicify any pc which to shutdown so I tried changing that codes to this codes which I think satisfy my goal. But it turns out that this doesn't work.</p>
  
  <pre><code>System.Diagnostics.Process.Start("shutdown", "/s /m \\192.168.1.21 /t 5 /c 'Shutdown in 5 seconds'");
  </code></pre>
  
  <p>NO Exception in C# it just don't shutdown.</p>
  
  <p>I also try this but no luck.</p>
  
  <pre><code> System.Diagnostics.Process.Start("shutdown /s /m \\192.168.1.21 /t 5 /c 'Shutdown in 5 seconds'");
  </code></pre>
  
  <p>C# Exception "The system cannot find file specified".</p>
  
  <p><strong>EDIT:</strong> </p>
  
  <p>I forgot to tell you that I alredy set up my remote computer and server the way that it will not fail to connect to each other such as turning off the firewall, configuring Local system policy and changing network and sharing center.</p>