Remote restart computer (C #) First add a reference to System.Management, then enter the code: ConnectionOptions op = new connectionOptions (); op.username = "wgscd"; or your account (note must have administrator) OP .Password = "wgscd"; 'Your password managementscope scope = new managementscope (" " 106.54.20.1 " " // root // wgscd ",
OP); try {scope.connect (); system.Management.ObjectQuery oq = new system.management.ObjectQuery ("Select * from
Win32_operatingsystem "); managementObjectsearchObjectSearcher (Scope, OQ); // Get WMI Control ManagementObjectCollection QueryCollection1 = query1.get ();
Foreach (ManagementObject Mobj IN QueryCollection1) {string [] str = {"}; mobj.invokemethod (" reboot ", str);}} catch {}