Kaseya Community

Anyone know how to disable SHUTDOWN, but allow REBOOT

  • I want to be able to allow users to reboot but not shutdown. This way we can run maintenance at night. I have been looking all over and the best I can find is hiding the shutdown option, but this disables reboot as well. Then I am forced to provide them a desktop icon that scripts "shutdown.exe -r" etc.

    What I really want is just have the machine reboot instead of shutdown no matter which option they choose.

    Anyone?


    Legacy Forum Name: Anyone know how to disable SHUTDOWN, but allow REBOOT,
    Legacy Posted By Username: far182
  • You can use a policy to do this.

    In the computer policy --> Windows Settings --> Security Settings --> User Rights Assignment, you can clear the groups in the "shutdown the system" option, just make sure your users are not in the administrators group.

    Kind Regards,

    Patrick




    Legacy Forum Name: System Administration Scripts,
    Legacy Posted By Username: p.twisterling
  • U can also use a Registry Key to do this, so you can script that in Kaseya.....

    [HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionPolicies
    Explorer]
    [HKEY_LOCAL_MACHINESoftwareMicrosoftWindowsCurrentVersionPolicies
    Explorer]
    Value Name: NoClose
    Data Type: REG_DWORD (DWORD Value)
    Value Data: (0 = shutdown enabled, 1 = shutdown disabled)

    Kind Regards,

    Patrick




    Legacy Forum Name: System Administration Scripts,
    Legacy Posted By Username: p.twisterling
  • Patrick,

    Do both the HKCU and HKLM entries need to be created? My script says it updates the HKCU, but when I lookusing Regedit, I don't see the NoClose entry. The HKLM entry is there?

    Also, will this give them a "Restart" option, or just the "Log Off"? Can they still shutdown if they do Ctrl-Alt-Delete?

    Thanks!


    Bill


    Legacy Forum Name: System Administration Scripts,
    Legacy Posted By Username: billmccl
  • Of course you could always use Wake On LAN, assuming your hardware supports it.

    Legacy Forum Name: System Administration Scripts,
    Legacy Posted By Username: connectex
  • I've got some that don't support WOL, so I was wanting to Disable Shutdown in order to have the devices online for scripts and patching during the off-hours.

    Legacy Forum Name: System Administration Scripts,
    Legacy Posted By Username: billmccl
  • This is exactly why I hate it when a client doesn't askfor or ignores ourrecommended new hardware requirements. By trying to be "cheap", they force us to work even harder.The only way to keep costs down is to have a consistent approachto produceconsistent results.

    Legacy Forum Name: System Administration Scripts,
    Legacy Posted By Username: connectex


  • Only tested it on XP.

    -------------------------------

    Script Name: No shutdown
    Script Description: Disables shutdown

    IF True
    THEN
    Set Registry Value
    Parameter 1 : HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\policies\explorer\NoClose
    Parameter 2 : 1
    Parameter 3 : REG_DWORD
    OS Type : 8
    ELSE
    Write Script Log Entry
    Parameter 1 : Failed
    OS Type : 0






    Legacy Forum Name: System Administration Scripts,
    Legacy Posted By Username: ccasper
  • I think there are two registry entries required:

    Script Name: Disable Shutdown
    Script Description: Disable the Shut Down Command (All Windows) Popular
    This option allows you to stop users from being able to shutdown the computer by disabling the shut down command.


    IF True
    THEN
    Set Registry Value
    Parameter 1 : HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoClose
    Parameter 2 : 1
    Parameter 3 : REG_DWORD
    OS Type : 1
    Set Registry Value
    Parameter 1 : HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\policies\system\ShutdownWithoutLogon
    Parameter 2 : 0
    Parameter 3 : REG_DWORD
    OS Type : 1
    ELSE




    Legacy Forum Name: System Administration Scripts,
    Legacy Posted By Username: rvines
  • That worked great! It "greyed" out the Shutdown option after logoff. I noticed though that you can still Ctrl-Alt-Delete when logged on and select the Shutdown option. Do you leave this option available just in case, or is there a registry setting to disable this as well?

    Thanks!!!


    Legacy Forum Name: System Administration Scripts,
    Legacy Posted By Username: billmccl