![]() |
![]() |
![]() |
|||||
![]() |
![]() |
![]() |
![]() |
![]() |
|||
| Welcome
to Tech Support Forum home to more then 136,000 problems solved. Issues
have included: Spyware, Malware, Virus Issues, Windows, Microsoft,
Linux, Networking, Security, Hardware, and Gaming Getting your
problem solved is as easy as: 1. Registering for a free account 2. Asking your question 3. Receiving an answer Registered members: * See fewer ads. * And much more..
|
| Want to know how to post a question? click here | Having problems with spyware and pop-ups? First Steps |
|
|||||||
| Programming A discussion forum for programs and programming used in tech-related businesses. |
![]() |
|
|
LinkBack | Thread Tools |
|
|
#1 (permalink) |
|
Registered User
Join Date: Apr 2009
Posts: 1
OS: XP
|
help with remote shutdown of computer on a domain
I have created this bat to read the computer names from a text file. But for some reason it not working. I have created tons of other batch files that read from a text file, but for some reason this will not work. I figured I need some fresh eyes.
P.S. it suppose to record the results into a text file @echo off set shut="C:\test.txt" Echo ### Mid South Computer Shutdown shutdown -s -f -m \\%shut% >>C:\regionshutdown\shutlog.log @echo off |
|
|
|
| Important Information |
|
Join the #1 Tech Support Forum Today - It's Totally Free!
TechSupportForum.com is a leading support website for your computer needs. We offer free, friendly and personalized computer support. Why pay to have your computer fixed when you can do it for free. Join TechSupportforum.com Today - Click Here |
|
|
#2 (permalink) |
|
TSF Enthusiast
Join Date: Mar 2009
Location: Portland, OR
Posts: 815
OS: MS-Dos 6.22 - Win7
|
Re: help with remote shutdown of computer on a domain
Welcome to TSF!
All that does it try to shutdown a PC named "C:\test.txt", it won't actually read from the test file. Not too many commands support passing a list of PC names in a file. You'll need something like this: Code:
@echo off set PCName=C:\test.txt Echo ### Mid South Computer Shutdown For /F "tokens=*" %%I In (%PCName%) Do shutdown -s -f -m \\%%I >>C:\regionshutdown\shutlog.log Code:
For /F "usebackq tokens=*" %%I In ("%PCName%") Do shutdown -s -f -m \\%%I >>C:\regionshutdown\shutlog.log
Jerry |
|
|
|
|
|
#3 (permalink) |
|
Tech, Networking Forums
Join Date: Apr 2005
Location: 1265 Lombardi Ave.
Posts: 1,142
OS: All of the above
|
Re: help with remote shutdown of computer on a domain
I just use this.
http://users.telenet.be/jbosman/applications.html |
|
|
|
![]() |
| Thread Tools | |
|
|