Windows Server

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

Recover Lost Disk Space

We currently share development clients and so there can be many people that use each one. Several times some of those clients have filled their C: drives and I have been unable to find where it went. I checked user desktops, downloads, etc. However, I was unable to find anything.

Then, I ran across a simple command that can empty the recycle bins of every user on the PC and help you recover your lost disk space:

rd /s /q "C:\$Recycle.Bin"

Hopefully, writing this little tip here will help me remember and maybe help someone else that has lost disk space and doesn’t know where it went.

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 wasn’t 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 isn’t 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 didn’t totally clear out the directory, but it did reduced it down to only 5 GB.