在C#中使用shutdown.exe关闭另一个系统?

V.V*_*V.V 7 c# asp.net remoting shutdown system-shutdown

我使用以下代码关闭自己的System.It工作正常.我需要 关闭另一个系统,它连接在LAN连接.我无法使用此代码执行此操作.如何使用shutdown.exe关闭另一个系统?我的操作系统是windows7.

using System.Diagnostics;


        protected void Button1_Click(object sender, EventArgs e)
        {
            Process.Start("shutdown.exe", "-s -t 00");

        }
Run Code Online (Sandbox Code Playgroud)

小智 1

菜单开始->运行->输入cmd->按回车键

在cmd类型中

shutdown /?
Run Code Online (Sandbox Code Playgroud)

可以看到help,根据help你需要的key是

   /m \\computer Specify the target computer.
Run Code Online (Sandbox Code Playgroud)