How to shutdown a Windows Server 2003 machine remotely usin C#?
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 appea开发者_StackOverflowr to work :(
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.
精彩评论