1

I have a laptop and a desktop on the same workstation. On the desktop I have a virtual that shuts down when the host machine shuts down. Rather than have to remote from the laptop into the desktop to shut the machine down, can I use a batch file to do this? Do I have to be able to access the machine as that machine's administrator then, or can I use an account on the laptop?

Thanks.

3 Answers 3

2

You can use shutdown.

shutdown /s /m \\COMPUTERNAME

There is also psshutdown from Sysinternals, which allows you to specify an admin account and password.

psshutdown \\COMPUTERNAME -u user USERNAME -p PASSWORD -k

2

There are lot of solutions, you can use shutdown, psshutdown (from Sysinternals), or using PowerShell (a sample script here Remote Shutdown script

0

The title you provided is about using a batch file to shut down a computer, but you didn't mention the OS you're using (probably DOS/Windows though because you used the term "batch file") and your main question doesn't indicate if you have a mechanism in place to detect the shutdown operation, so I'm providing an answer to shutting down your computer from a batch file:

In Unix (e.g., NetBSD, OpenBSD, FreeBSD, Linux, etc.): shutdown -p now

In Windows, there's a free tool called "Wizmo" by an Assembler programmer named Steve Gibson that will do the job for you -- it provides a variety of shutdown options and can be called from a batch file: http://www.grc.com/wizmo/wizmo.html

In DOS, I'm not aware of any such tool.

I hope that helps.

1
  • He mentioned the OS in the tags.
    – paradroid
    Feb 14, 2011 at 2:02

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .