Do you want your Computer to a Server and want to prevent it from Shutting Down? Or Do do you want to prevent anyone from Shutting Down your PC for various reasons? There is a simple way to remove the Shut Down option from the Start Menu, Task Manager, and Command Prompt.
Remove Shutdown from Start Menu and from the Task Manager
For Windows XP: Go to Start and click Run.
For Windows 7 / Vista: Go to Start, in the Start Search type gpedit.msc and click Enter.
Write gpedit.msc in RUN Command.
Group Policy window will pop up from which choose User Configuration > Administrative Templates > Start Menu & Taskbar from the Left Panel as shown below.
Now on the Right Panel, double-click on Remove And Prevent Access To Shut Down Command.
A pop will appear set it to Enabled. Then you’ll notice that this will remove the shutdown option from the Start Menu and security dialog box. Now the system can be shutdown via the command prompt only.
Disable Shutdown From Command Prompt
Finally, you need to prevent people from going to the command prompt and simply typing in Shutdown. To do this here is the simple method.
Use Similar method as above but this time navigate to User Configuration > Administrative Templates > System from the left menu and double-click on the Prevent Access To The Command Prompt policy from right pane and set it to Enabled.
I hope this helps, you can revert the settings back anytime you want by following the same steps as above and restoring it.