locked
Can someone make a shutdown/restart plug-in? RRS feed

  • Question

  • I'd love to be able to shutdown or restart the console from the Client Tray Icon's right click menu.

     

    Is this possible??

    Friday, June 1, 2007 3:51 PM

Answers

All replies

  • I'm unsure exactly what you're asking here. You mean something other than the existing "Windows Home Server Console" (and other options) that appear when you right-click the WHS icon on a client machine?
    Friday, June 1, 2007 8:59 PM
  • I would like to be able to shutdown or restart my server without having to pull up the console, goto settings, then click shut-down.

    Ideally I'd like to be able to right click on the tray icon on a client and choose a new option called shutdown.

    Is that feasible?
    Friday, June 1, 2007 9:34 PM
  • You won't be able to extend the context menu on the WHS tray icon.

     

    However, you could easily create a shortcut that you put in your quicklaunch or on the desktop that invoked shutdown.exe (Windows Server 2003 Resoruce Kit) or PsShutdown.exe (http://www.microsoft.com/technet/sysinternals/utilities/psshutdown.mspx)

     

    psshutdown.exe \\server -u Administrator -p <administrator password> -k -f

    Saturday, June 2, 2007 4:17 AM
    Moderator
  • I completely forgot about that.

     

    Thanks Smile

     

    Is it possible to do that without leaving the admin password for the server sitting in a shortcut?

    Saturday, June 2, 2007 4:49 AM
  •  Brothernod wrote:

    I completely forgot about that.

     

    Thanks

     

    Is it possible to do that without leaving the admin password for the server sitting in a shortcut?

     

    You could wrap the command line in a VBScript or PowerShell script that promped for the pwd.

    Saturday, June 2, 2007 6:05 AM
    Moderator
  • This could actually be really helpful.

    Thanks cek.

    Saturday, June 2, 2007 5:41 PM
  • Yes, just don't use the password switch.  It will prompt you for the password then.  That is how most of the PsTools work.
    Monday, June 4, 2007 4:44 PM
  • I was able to do a restart and a shutdown shortcut without the need for entering an administrator password, just calling the shutdown.exe process in c:\windows\system32.

    Here's the path for my restart shortcut:

    c:\windows\system32\shutdown.exe -f -r -t 10

    The 'f' switch forces any running applications to shutdown while suppressing warnings
    The 'r' switch shuts down and restarts the computer
    The 't' switch is the timeout in seconds to wait for the shutdown, 10 seconds in my case

    Here's my path for the shutdown shortcut:

    C:\WINDOWS\system32\shutdown.exe -f -s

    As above, the 'f' switch terminates any open applications
    The 's' switch shuts down the computer without a restart
    Wednesday, June 6, 2007 5:10 PM
  • @Jim - your code shuts down the local machine, so the Admin password is not needed (as you would be logged in already).

    The password is needed when you shutdown a remote PC (such as the WHS server server from your desktop PC).


    Wednesday, June 6, 2007 6:36 PM
  • I bet you can make this work (w/o pwd) if you TS into the home server and make yourself an administrator - I believe shutdown uses WMI under the hood and that would (I think) use NTLM to auth you automatically

     

    if you try this reply back, I'm interested in knowing how it goes Smile

    Thursday, June 7, 2007 3:35 AM
  • Ok... the latest addition to my add-on is allowing for "dynamic commands".

     

    So you can add a command that does exactly what you want...

    Restart, reboot, shutdown etc.

     

    Have a look at the development section under "Wake on lan Addin".

     

    Please reply to this post if you need more details.

    Thursday, June 7, 2007 10:13 PM