0

My IIS inetpub folder says it's using 2.52 Gb (2.64 Gb on disk) but when I analyse disk usage with Windows Storage it says the folder is 60.0 Gb.

Why is this happening and how can I get my 57.36 Gb back?

I'm running Windows Server 2016 on Amazon EC2 and I've had to up-size the server volume three times now. My fear is that it'll fill up, the web-apps will die, and I won't be able to connect to the server again.

I'm deleting the log files automatically with this scheduled task: forfiles: /p "C:\inetpub\logs\LogFiles" /s /m *.* /c "cmd /c Del @path" /d -2/p "C:\inetpub\logs\LogFiles" /s /m *.* /c "cmd /c Del @path" /d -30

screenshot showing disk usage 60.0 Gb vs 2.52 Gb

Rob
  • 3
  • 1

1 Answers1

0

Figured it out - two issues:

  1. I was logging in as someone within the "Administrators" group but not the "Administrator" - when I did, the Folder Properties matched the Windows Settings, Storage value
  2. The script I was using to delete the old log entries was insufficient - see Delete Old Log Files by Script at on Microsoft's Managing IIS Log File Storage page for the correct script to run