Windows Server

The EnterpriseOne Microsoft Windows Server category will include all posts and pages pertaining to Microsoft Windows Server in an EnterpriseOne installation.

Check Windows Service Status And Restart If Necessary

Lately we have been noticing an issue where the Print Spooler service stops for some reason and users are unable to print UBE results through EnterpriseOne.  So far, we have been unable to narrow down a cause for the Spooler service to stop.

So, like any good CNC Admin, I put a band-aid on it.  I found a bat file script that I could use to check the status of the service and then restart the service it it wasnt running. I then setup a scheduled task to run every 5 minutes.

 
ECHO OFF
for /F "tokens=3 delims=: " %%H in ('sc query "Spooler" ^| findstr "        STATE"') do (
ECHO STATE = %%H  
if /I "%%H" NEQ "RUNNING" (
   REM Put your code you want to execute here
   REM For example, the following line
   net start "Spooler"
   ECHO Spooler has been restarted
  )
)

Do you have any band-aids that you use to mitigate issues?

Safely Delete Files From WINSXS

We started to run out of disk space on one of our production Windows Enterprise servers.  This usually isnt a huge deal with virtual machines, however this was on the c drive.  Yes, I know those can be expanded too, however I wanted to do a little investigating before I just started dumping disk space to it.

I found that there were over 12 GB taken up by the c:\windows\winsxs directory.  I did some checking around the internet and found a blog post (Clean up Winsxs on Windows 2008 R2 after SP1 install) that provided me with a way to cleanup the WINSXS directory in a way that was supported by Microsoft:

DISM.exe /online /Cleanup-Image /spsuperseded

Now, it didnt totally clear out the directory, but it did reduced it down to only 5 GB.