Question:

Fix this remote shutdown batch file please!!!?

by  |  earlier

0 LIKES UnLike

Here is the code:

net use \\<ip or hostname>\ipc$ /user:<administrator>

shutdown -i -s -m \\<ip or hostname> -t 1

Then:

A remote shutdown window pops up, and everything goes fine until it says add computer. My directory agent isn't working, so I can't browse for it. I tryed clicking add and typing in the IP. I also tryed typing in the computer name.

Then, back in the command prompt, it says:

Access is denied

Failed <Whatever I typed in>

 Tags:

   Report

2 ANSWERS


  1. I believe the problem is that although you map the admin share in the first line, your second line is using the id that you are currently logged onto windows as.  Try making an account on the second machine with the same ID as you log onto your first system, or create an account on your machine with a valid userid/password to the second machine and try running your batch file with runas e.g. start--&gt;run--&gt; runas /u:acct.on2ndmachine cmd.exe


  2. You might need to use a password in your net use script.

    I&#039;m thinking it&#039;s more likely that you need to download and use psadmin (from sysinternals) so that you can run the shutdown command on the remote machine as if you were sitting at the remote machine&#039;s console.

Question Stats

Latest activity: earlier.
This question has 2 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.