Hi, im trying to shudown computers in a LAN but its not working, in administrator.
first i open cmd and type : net view to get a list of the computers in the LAN
then i ping the computer i want to shutdown,
then i type: shutdown -i
i select the computer i want to shutdown by writing the name of it when press shutdown but its only shutdowns my computer
Shutdown computer in LAN help
Moderator: DosItHelp
Re: Shutdown computer in LAN help
Shutdown command is like this:
The compute name is what you are missing, the GUI not working on my pc ?? but this should work if you have administrator access to the pc
Edit:
BTW, It never worked with me whether i have admin rights or not
shutdown -s -f -m \\computer_name -t 30 -c comment
The compute name is what you are missing, the GUI not working on my pc ?? but this should work if you have administrator access to the pc
Edit:
BTW, It never worked with me whether i have admin rights or not
Last edited by abc0502 on 22 Oct 2012 06:32, edited 2 times in total.
Re: Shutdown computer in LAN help
.
Or automate it a little...
Any Dos command can replace 'shutdown -r -t 0'.
NOTE: WMIC WILL NOT WORK REMOTELY, IF THE REMOTEUSER HAS NO PASSWORD!
Code: Select all
wmic /node:"COMPUTERNAME" /user:REMOTEUSERNAME /password:REMOTEPASSWORD process call create "cmd.exe" /c shutdown -s -t 0
Or automate it a little...
Code: Select all
@echo off
:main
set "netnode="
set "remuser="
set "rempass="
cls
for /f "tokens=1 delims=\" %%g in ('net view ^| findstr "\\"') do (
ping -4 -n 1 %%g | findstr "Pinging">>netview.txt)
echo.
echo Network Computers
echo -----------------
for /f "tokens=2,3" %%g in (netview.txt) do echo %%g %%h& del netview.txt
echo -----------------
echo.
echo Which computer?
set /p netnode=
echo.
echo Username at remote location?
set /p remuser=
echo.
echo Password of remote user?
set /p rempass=
:error
cls
echo.
echo Network Computer: %netnode%...
echo.
echo 1 to shutdown, or 2 to restart...?
set /p option=
if %option%==1 goto shutdown
if %option%==2 goto restart
goto error
:restart
wmic /node:"%netnode%" /user:%remuser% /password:%rempass% process call create "cmd.exe" /c shutdown -r -t 0
:shutdown
wmic /node:"%netnode%" /user:%remuser% /password:%rempass% process call create "cmd.exe" /c shutdown -s -t 0
goto main
Any Dos command can replace 'shutdown -r -t 0'.
Code: Select all
wmic /node:"%netnode%" /user:%remuser% /password:%rempass% process call create "cmd.exe" /c systeminfo>>(YOUR NETSHARE)
NOTE: WMIC WILL NOT WORK REMOTELY, IF THE REMOTEUSER HAS NO PASSWORD!