Windows Client OS

Quickly Shut Down Computers on Network

How can I quickly shut down all the computers on my network?

Use the FOR command combined with the SHUTDOWN command:

​FOR /L %i in (1,1,254) DO shutdown ''192.168.0.%i 

Sponsored Content

Passwords Haven’t Disappeared Yet

123456. Qwerty. Iloveyou. No, these are not exercises for people who are brand new to typing. Shockingly, they are among the most common passwords that end users choose in 2021. Research has found that the average business user must manually type out, or copy/paste, the credentials to 154 websites per month. We repeatedly got one question that surprised us: “Why would I ever trust a third party with control of my network?

Windows XP will let you log-off all users in one line:

​FOR /L %i in (1,1,254) DO shutdown ''192.168.0.%i /l

Change 192.168.0 to match you own Network ID.

For Windows Server 2003 based computers you’ll need to refine the SHUTDOWN command and provide the reason for the restart or shutdown. For example, if you plan to reboot servers because of a security fix deployment you can use the following command:

​FOR /L %i in (1,1,254) DO shutdown /r /m ''192.168.0.%i /d p:2:18

Use SHUTDOWN /? for a complete list of available switches.

Note: The above scripts will cause ALL the computers on your LAN (basically, on the segment you pointed, for the above example) without notifying their users. It will also shut down all your file servers, print servers, domain controllers, e-mail servers and all other Windows based computers. You do NOT want to do that, do you? Change the IP address range to suit YOUR needs!

You can disable other user’s ability to remotely shutdown computers by editing their respective Local Security Policy in the User Rights section, or, if you’re in a W2K domain you can edit the servers’ GPO.

Download Shutdown.exe it you don’t have it from HERE (11kb). This is a GUI version of the command:

Windows XP has the SHUTDOWN  command built-in, and running it as SHUTDOWN -i will bring up this console:

Many other tools will enable you to remotely shutdown a system.

Related Topics:

Don't leave your business open to attack! Come learn how to protect your AD in this FREE masterclass!REGISTER NOW - Thursday, December 2, 2021 @ 1 pm ET

Active Directory (AD) is leveraged by over 90% of enterprises worldwide as the authentication and authorization hub of their IT infrastructure—but its inherent complexity leaves it prone to misconfigurations that can allow attackers to slip into your network and wreak havoc. 

Join this session with Microsoft MVP and MCT Sander Berkouwer, who will explore:

  • Whether you should upgrade your domain controllers to Windows Server
    2019 and beyond
  • Achieving mission impossible: updating DCs within 48 hours
  • How to disable legacy protocols and outdated compatibility options in
    Active Directory

Sponsored by: