Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?


share|improve this question
up vote 2 down vote accepted

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

share|improve this answer

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

share|improve this answer

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:

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

I hope that helps.

share|improve this answer
He mentioned the OS in the tags. – paradroid Feb 14 '11 at 2:02

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.