Windows 7 Forums
Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.

Windows 7: Command Prompt Remote Shutdown

13 Apr 2017   #1

Windows 7 Professional x64
Command Prompt Remote Shutdown

Hi All

I was hoping someone could help me and see if it could be possible for the below, I have setup a script/batch file to remote shutdown several PCs which all work fine without any issues as long all the machines are turned on then it will go through the list one by one and push down the command to each machine, what I'm having issues with is for example

If I have 5 machines 1,2,4,5 are turned on and PC3 was currently off. the batch file would run through and send each command down turning off PCS 1,2 then it would sit there trying to send the command to PC3 (now this machine is turned off) - I would then get an error message as shown below - it would then move onto PC4,5 - this is all well and good but if I have 100 machines and only 30 are turned on I need to wait a long time for all to be turned off with these error message.


The entered computer name is not valid or remote shutdown is not supported on the target computer. Check the name and then try again or contact your system administrator. (53)

All I want to do is push down the command with waiting for a response whether the PC is up or not, this would bypass checked for a ping response (if it did this)

Can this be possible, i have looked online and can't see anything to use

Attached Images
Command Prompt Remote Shutdown-capture.jpg 
My System SpecsSystem Spec
13 Apr 2017   #2

Microsoft Windows 7 Ultimate 32-bit 7601 Multiprocessor Free Service Pack 1

Marc, hopefully the following link will do the trick. According to the description, this won't hang up if a computer is already off. Here's a link to the Microsoft Technet page:

Let us know if it works. Good Luck!
My System SpecsSystem Spec
21 Apr 2017   #3

Windows 10, Windows 8.1 Pro, Windows 7 Professional, OS X El Capitan

I suggest performing a ping test prior to sending the shutdown request. That way you’ll have more control over the waiting times.

Because ping can sometimes fail to set the error level, the content of the ping needs to be checked to determine whether the host is alive.
ping -n 1 | find "TTL=" >nul && (
	echo The host is alive, commencing shutdown command…
) || (
	echo The host is not active
My System SpecsSystem Spec


 Command Prompt Remote Shutdown

Thread Tools

Similar help and support threads
Thread Forum
Command Prompt command <ipconfig> not working
when I open up my command prompt and type 'ipconfig' without the ' and press enter it returns the line: 'ipconfig' is nto recognized as an internal or external command, operable program, or batch file I am trying to find out the information I need in order to set up a static IP Address for port...
Network & Sharing
Command Prompt: Repeat del command continuosly
Hi All, I'm running a program that parses .csv files and then changes them into ._OK files. This process takes longer when there are a large number of *.OK files in the folder where the files being converted are located. To remedy this I occasionally manually run this command: del *._OK ...
General Discussion
"Copy" command in command prompt generates 0x1a artifact?
Hello Everybody! I don't know if this is a real issue, or just one of those "What the . . . .!!" situations. You judge. Situation: I was working on a batch file that combines two .txt (ASCII?) files created in Notepad to create a composite file, and I noticed something really interesting. ...
Run administrative command prompt from command prompt
Ok So I got myself into a unique bind here. I was trying to install some custom system files (for a theme) and I did it wrong and now I cant open explorer.exe . I dont want to goto a backup because this is a easy fix. (in my view). So I need to know how to run command prompt with administrative...
General Discussion
Shutdown Command and Remote Desktop
Im having a problem that i just can not figure out. I have two pc's running windows 7 64 bit. One labtop one desk. I have been recently trying to remote desktop but it will not work on neither computer. All the correct options are checked to allow. Firewall has exception for it on both ect. I just...
Network & Sharing

Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 23:27.
Twitter Facebook Google+