Shutdown a remote computer connected in LAN in any preferable language

后端 未结 7 2061
逝去的感伤
逝去的感伤 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:29

    You can connect to any computer on the domain and shut it down using the Win32Shutdown method of the WMI class Win32_OperatingSystem. In .NET you access WMI through the System.Management namespace.

提交回复
热议问题