Shutdown a remote computer connected in LAN in any preferable language

后端 未结 7 2114
逝去的感伤
逝去的感伤 2021-01-21 19:29

I want to shut down a remote Windows computer (ex. a Windows computer connected in LAN.) I have tried a lot but I could not find the solution. Does anyone have an idea on how to

7条回答
  •  独厮守ぢ
    2021-01-21 20:26

    If the remote computer is a Windows box you can use WMI (Windows Management Instrumentation).

    http://msdn.microsoft.com/en-us/library/aa394582.aspx

    Use the Reboot() method of the Win32_OperatingSystem class. You could do this for example using Windows Script, C#, VB .net

提交回复
热议问题