Shutdown/restart dialog?

Discussion in 'Windows Server Forums' started by kenw232, Mar 17, 2014.

  1. kenw232

    kenw232 Senior Member

    Joined:
    Dec 15, 2009
    Messages:
    20
    Likes Received:
    0
    I need to make a shortcut to bring up the shutdown/restart dialog box. The same dialog that comes up when you hit ALT-F4 on the desktop as Admin. In Windows Server 2012 R2. Anyone know how to trigger that?

    Thanks.
     
  2. peterbata

    peterbata Well-Known Member

    Joined:
    Nov 10, 2013
    Messages:
    10
    Likes Received:
    0
    I use the shutdown -i run command. I'm not sure if that's what your looking for though. Good luck!
     
  3. kenw232

    kenw232 Senior Member

    Joined:
    Dec 15, 2009
    Messages:
    20
    Likes Received:
    0
    A .vbs file with this is better:
    CreateObject("Shell.Application").ShutdownWindows
     
  4. ussnorway

    ussnorway Windows Forum Team
    Staff Member Premium Supporter

    Joined:
    May 22, 2012
    Messages:
    2,535
    Likes Received:
    315
    So you want an icon that (when pressed) makes a textbox appear on your own desktop?

    Any such code would be treated as an executable by the security settings (especially on a server) and blocked or at the very least you would be asked to confirm its permissions. What is the concept of this code i.e. is it just something that can be added to a group policy to run at start up or does it have to be an "on click" scenario?
     
    chrisguk likes this.
  5. chrisguk

    chrisguk Member

    Joined:
    Sep 1, 2014
    Messages:
    4
    Likes Received:
    1
    Absolutely what ussnorway said. Creating a shortcut to shut any server machine down is bad practice and dangerous ground.

    Petebata suggested using the CMD window and this for admins is the preferred way unless of course you needed to do it out of hours, then GPO would be the best option.

    run shutdown ? for a list of options in the cmd window
     

Share This Page

Loading...