开发者

How to shutdown a Windows Server 2003 machine remotely usin C#?

开发者 https://www.devze.com 2023-03-20 16:55 出处:网络
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 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

精彩评论

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