More

Sunday, 15 February 2015

shutdown computer remotly

Having an ability to shutdown computers remotely is helpful not only for network administrators who need to turn off workstations at night to save electric power, for example, but also for home users who have more than one PC in the network and like to manage them remotely. There are a number of ways how you can execute network shutdown command, but all of them have some preconditions.
It's important to remember that you can initiate remote shutdown operation, described in this article, only for Windows PCs available in the local network. To check a list of PCs available in the local network you can open Network (or Network Neighborhood is early Windows) in the Windows Explorer. Also to execute network remote shutdown you should have an administrative access to remote PC. This security limitation prevents unauthorized shutdown of remote computers.
Starting from Windows Server 2003 (for server platforms) and Windows XP (for desktop platforms) Windows includes shutdown.exe utility in the standard distribution. This utility can be used to shutdown a local or network PCs. You can use it in a command-line mode by typing shutdown.exe in the Windows command prompt (known as CMD). A set of command-line parameters for shutdown command is described in MSDN article, but at a time of writing this article doesn't describe all parameters available for shutdown.exe that comes with Windows 7. So it makes sense to get a list of command-line parameters for your system by running a following command:
shutdown -?
In order to shutdown a remote PC you can run such command:
shutdown /s /m \\ComputerName
Lets break it down:
  • /s - instructs to make a shutdown
  • /m \\ComputerName - specifies the name of remote PC to shutdown it remotely
Important: As it was mentioned above, shutdown.exe can have different parameters on different Windows versions. But parameters syntax also can be different. For example on XP you have to use '-s' instead of '/s'.
Shutdown command has additional parameters that help to control behavior of shutdown operation. For example, a command below makes remote shutdown of specified PC with 60 seconds timeout during which a message will be displayed on remote PC and then all running applications are forced to close:
shutdown /s /f /m \\ComputerName /t 60 /c "PC will be tuned off in 60 sec"

Method Two: Using Windows Shutdown Utility in UI Mode

If you prefer to use visual interface instead of specifying command-line parameters, you can make network remote shutdown from the visual interface by starting shutdown.exe in a dialog mode. Remote Shutdown Dialog offers less options than available from the command-line, but you can execute all main operations such as remote shutdown and reboot. In order to run shutdown.exe as a dialog, you have to execute following command in the Windows command prompt (Windows Start > click Run > type CMD > enter the command below).
shutdown /i

  • You can use  set of features on all Windows versions (starting from Windows 2000).
  • You can lock local or remote PC and logoff the current user. Network remote shutdown operation can be aborted by the interactive user.
  • You can specify a list of remote PCs in the file instead of typing them in the command-line.
For example, using the command below you can execute network shutdown tasks on computers, which names are specified in computers.txt file, with 60 seconds timeout during which a message will be displayed on remote PC and user can abort operation.
psshutdown -s -c -t 60 -m "PC will be tuned off in 60 sec"

No comments:

Post a Comment