shutdown -f -r -t 5 -m computername
To accomplish this we are going to configure a group policy to prevent the user from shutting down an RDP server. First we’re going to open group policy editor.
We’re going to browse to administrative templates>Start menu and taskbar
“remove and prevent access to the shutdown command”
Since we’re applying this group policy to a set of PC’s as opposed to a user account we also need to configure the loopback processing setting. That can be found in this post