Translator
      English flagItalian flagKorean flagChinese (Simplified) flagChinese (Traditional) flagPortuguese flagGerman flagFrench flag
      Spanish flagJapanese flagArabic flagRussian flagGreek flagDutch flagBulgarian flagCzech flag
      Croatian flagDanish flagFinnish flagHindi flagPolish flagRomanian flagSwedish flagNorwegian flag
      Catalan flagFilipino flagHebrew flagIndonesian flagLatvian flagLithuanian flagSerbian flagSlovak flag
      Slovenian flagUkrainian flagVietnamese flagAlbanian flagEstonian flagGalician flagMaltese flagThai flag
      Turkish flagHungarian flagBelarus flagIrish flagIcelandic flagMacedonian flagMalay flagPersian flag
    Tag Cloud
    Sponsors
    Recent Comments
      Archives
      Link with us

      IT Solutions Knowledge Base

      Visitors

      Today Visitors: 284
      Currently Online: 7

      256-bit Secured



Remote Shutdown Windows Network Machines
Home » Networking, Windows Server, Windows Server 2003, Windows Server 2008 » Remote Shutdown Windows Network Machines
By Glafkos Charalambous | 2 CommentsLeave a Comment
Last updated: Tuesday, January 20, 2009

This article will describe how to shutdown remote network computers by using a small batch script to loop into each hostname/ip line within a text file and issuing the shutdown command to the computer(s).

The above code will take an argument for the shutdown time which we specify while running the script:

@echo off
if “%1″==”" goto fin
for /f “tokens=1″ %%i in (computers.txt) do ^
shutdown -s -t %1 -f -m \\%%i
:fin

Explaining the above code we first check if an argument exist so it continues with the batch file else it ends.
For each hostname/ip inside the computers.txt it executes the shutdown command for each remote machine inside the network.

We could even simplify the script without asking for any arguments with the following snippet:

@echo off
for /f “tokens=1″ %%i in (computers.txt) do ^
shutdown -s -t 30 -f -m \\%%i

The -t 30 is for the time limit which by default is 30 if you do not specify that option.
The -s option shutdown the computer.
The -f option forces the application to close while the system shutdown without asking the user to interact.
The -m option is to specify the computer(s) hostname/ip.

After we finish with the batch file we can schedule it to run through a domain admin account to remotely shutdown the network computer(s) at specific times and dates.

VN:F [1.9.3_1094]
Rating: 7.6/10 (5 votes cast)
VN:F [1.9.3_1094]
Rating: 0 (from 0 votes)
Remote Shutdown Windows Network Machines, 7.6 out of 10 based on 5 ratings
  • Digg
  • Facebook
  • Technorati
  • del.icio.us
  • StumbleUpon
  • Sphinn
  • Reddit
  • Google Bookmarks
  • Wikio IT
  • Slashdot
  • co.mments
  • Fark
  • Fleck
  • LinkedIn
  • Ma.gnolia
  • MySpace
  • Propeller
  • Print
  • email

Comments

2 comments
  1. Junaid
    May 9, 2009

    Please solve my problem from .bat file. i want to shutdown system through login that the person login from specific login id on local machine and after login script runs and system shutdown i want these two on Windows Server 2003 and Windows XP.

    [Reply]

    VA:F [1.9.3_1094]
    Rating: 0.0/5 (0 votes cast)
    VA:F [1.9.3_1094]
    Rating: 0 (from 0 votes)
    Leave a reply
  2. migbar
    December 16, 2009

    i want u to tell me with out any autentication i want to shutdown remotely using scripts like vbs please help me out

    [Reply]

    VA:F [1.9.3_1094]
    Rating: 0.0/5 (0 votes cast)
    VA:F [1.9.3_1094]
    Rating: 0 (from 0 votes)
    Leave a reply

Leave a Comment

Add your picture!
Join Gravatar and upload your avatar. C'mon, it's free!