Shutdown/restart dialog?

kenw232

Senior Member
#1
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.
 


peterbata

Well-Known Member
#2
I use the shutdown -i run command. I'm not sure if that's what your looking for though. Good luck!
 


kenw232

Senior Member
#3
A .vbs file with this is better:
CreateObject("Shell.Application").ShutdownWindows
 


ussnorway

Windows Forum Team
Staff member
Premium Supporter
#4
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?
 


#5
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?
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
 


This website is not affiliated, owned, or endorsed by Microsoft Corporation. It is a member of the Microsoft Partner Program.