bluedragon99
asked on
Visual basic restart remote computer
Hello I am looking for a module that will allow me to restart remote computers. Thanks
Just use tsshutdn ... it included in Windows 2000 and up... you can use it to restart remote servers..
As long you've got right for it on that server.
You also can call the program from VB or something like that.. just use WinEXec command for it.
Shut down a server in a controlled manner.
TSSHUTDN [wait_time] [/SERVER:servername] [/REBOOT] [/POWERDOWN]
[/DELAY:logoffdelay] [/V]
wait_time Seconds to wait after user notification before
terminating all user sessions (default is 60).
/SERVER:servername The server to shut down (default is current).
/REBOOT Reboot the server after user sessions are terminated.
/POWERDOWN The server will prepare for powering off.
/DELAY:logoffdelay Seconds to wait after logging off all connected
sessions (default is 30).
/V Display information about actions being performed.
Greetings Sicos..
As long you've got right for it on that server.
You also can call the program from VB or something like that.. just use WinEXec command for it.
Shut down a server in a controlled manner.
TSSHUTDN [wait_time] [/SERVER:servername] [/REBOOT] [/POWERDOWN]
[/DELAY:logoffdelay] [/V]
wait_time Seconds to wait after user notification before
terminating all user sessions (default is 60).
/SERVER:servername The server to shut down (default is current).
/REBOOT Reboot the server after user sessions are terminated.
/POWERDOWN The server will prepare for powering off.
/DELAY:logoffdelay Seconds to wait after logging off all connected
sessions (default is 30).
/V Display information about actions being performed.
Greetings Sicos..
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Very nice clean working code that matches the description of the question. Thanks!
I don't know about remote computers, but you can force a system restart as long as your VB file is on their computer:
http://support.microsoft.com/default.aspx?scid=kb;EN-US;168796
A problem in NT and 2000 and XP
http://support.microsoft.com/default.aspx?scid=kb;en-us;176695#appliesto
Regards,
Zyloch