I was really annoyed at how when you are using Remote Desktop to connect to a workstation, the Shutdown / Reboot option is replaced by the Disconnect option... I think it's probably a safe guard, which is nice to have, but I like to have the option.
I created a VBScript on my desktop called Shutdown.vbs; its remarkably simple.
the section that containsSet OpSysSet = GetObject("winmgmts:{(Shutdown)}//./root/cimv2").ExecQuery("select * from Win32_OperatingSystem where Primary=true")for each OpSys in OpSysSetx = InputBox("Reboot or Shutdown?", "Reboot or Shutdown?", "Shutdown")if Left(x, 1) = "R" ThenOpSys.Reboot()end ifif Left(x, 1) = "S" ThenOpSys.Shutdown()end ifnext
x = InputBox("Reboot or Shutdown?", "Reboot or Shutdown?", "Shutdown")
can be modified; if you change the last parameter, you can set it to "Reboot"
like I mentioned, its not overly complicated, but I found it annoying to keep typing
shutdown -s -t 1 or shutdown -r -t 1
*Note... when showing this to people from a remote location, be sure you really want to shutdown... otherwise you risk taking the walk of shame and force yourself to either call somebody there to turn it back on or do what every System Admin hates doing... get up and do it yourself.
No comments:
Post a Comment