Much of the time, the disk space on C: is being eaten up by IIS logs. IIS does not have any functionality to automatically delete old logs. So, I've seen servers with years of logs stored in C:\Inetpub\Logs\.
Here is a script that you can schedule as a task to remove old IIS log files:
# Adjust these two variablesThis calculates the age of the file based on the creation time. If you want it to be based on modified time use $_.LastWriteTime instead.
$iisLogDir = "C:\inetpub\logs"
$deleteAfterDays = 14
#calculate date for deletion
$removeDate = (Get-Date).AddDays(-$deleteAfterDays)
#Delete Files
Get-ChildItem -Path $iisLogDir -Recurse -Force | Where-Object { !$_.PSIsContainer -and $_.CreationTime -lt $removeDate } | Remove-Item -Force
The Where-Object command uses !$_.PSIsContainer (not container) to skip directories and only select files.