0

I want to shutdown/reboot a Windows Server 2003 machine remotely using C Sharp. I have the Administrator credntials. This app will be ran from local machines also on the LAN.

I have tried so many examples on the internet, and none appear to work :(

Leigh
  • 1

1 Answers1

0

Instal PsShutdown app from sysinternals link package and then use your code to call it like:

Process.Start("psshutdown.exe","-h -u "Login" -p "Password" \\PCNAMEORIP");

That's the simplest way i can suggest.

Andrii Horda
  • 170
  • 1
  • 16