# Solved: Windows Server 2012 R2 - Not restarting correctly



## Couriant (Mar 26, 2002)

Hello!

I was wondering if anyone has had an issue with 2012 server not restarting when it is requested? I have had to make a change for a printer and when I told it to reboot it only shut down. This is all done remotely as the server is hosted in another building.

I thought I may have done it by mistake, but another change to the same server saw the server lose connectivity but when I got to the server the power was on.

I do not have a monitor on site with this server (that will change real soon) but I was hoping for some input to see what is causing the server not to restart normally.

Thank you in advance.


----------



## valis (Sep 24, 2004)

not a clue.....was there anything in the event viewer?


----------



## Couriant (Mar 26, 2002)

Nothing other than when I powered it down.


----------



## angelr82 (Jun 15, 2010)

In my experience when you are RDP to a remote workstation or machine you don't always have the choice to shutdown or restart and sometimes it doesn't honor your choice.

I dont have much experience with Server 2012; once I used it, I hated it and went back to 2008R2 lol.

Have you tried maybe running a shutdown or restart command via the run box or power shell as a work around?

I have a little .bat file that I copy to my remote machines to help facilitate users who need to reboot or shutdown remotely but their remote desktops sessions wont allow it.

Copy and paste this to a blank txt file, give it a name.bat


```
@ECHO off
cls
:start
ECHO.
ECHO 1. Shutdown no delay
ECHO 2. Shutdown 30 Sec. Delay
ECHO 2. Restart no delay
ECHO 3. Restart 30 Sec. Delay
set /p choice=Type the number to execute.
rem if not '%choice%'=='' set choice=%choice:~0;1% ( don`t use this command, because it takes only first digit in the case you type more digits. After that for example choice 23455666 is choice 2 and you get the results of C2
if '%choice%'=='~0-9' ECHO "%choice%" is not valid please try again
if '%choice%'=='1' goto C1
if '%choice%'=='2' goto C2
if '%choice%'=='3' goto C3
if '%choice%'=='4' goto C4
ECHO.
goto start
:C1
Shutdown -s -t 00
goto end
:C2
Shutdown -s -t 30
goto end
:C3
Shutdown -r -t 00
goto end
:C4
Shutdown -r -t 30
goto end
:end
pause
exit
```
Customize the script by looking at the available switches run: "shutdown /?"

Hope this helps you or someone.

~A


----------



## Couriant (Mar 26, 2002)

Thanks for the replies. The server has not gone down since... though we have not made any changes to it either so 

We will see.


----------

