开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜