I have a batch file on a machine (Machine A) that when I wake it up from sleep it utilizes the utility psshutdown which wakes up another machine (Machine B) on my network. This part works without fail. What I would like to do is when I put
the machine (Machine A) to sleep, right before it sleeps, send a command using psshutdown to put the other machine (Machine B) to sleep as well. Unfortunately, every time I try to execute this the machine (Machine A) will fall asleep before the script
is done executing and never puts the machine (Machine B) to sleep. Is there a way to either wait for the script to finish before it puts Machine A to sleep or just delay sleep for x amount of time? Thanks in advance for your response.
Based on my research, this seems cannot be realized via batch file. You can check if this can be done by script. Check it in
Script Center. Or you can post a thread on
Script Center Forum.
Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. ”
Marked as answer byLinda YanThursday, August 05, 2010 1:31 AM
Microsoft is conducting an online survey to understand your opinion of the Technet Web site. If you choose to participate, the online survey will be presented to you when you leave the Technet Web site.