I am sure there is a much cleaner way of doing this but I am just a rookie.
Powershell
$Folder="Z:\Applications"$DaysOld=$null$TotalSize=$nullFunctionGetFilesByDate([string]$Folder){$a=Get-ChildItem$Folder-Recurse$y=((Get-Date)-$x.CreationTime).Days# Over 90 days oldIf($y-gt90-and$x.PSIsContainer-ne$True){$90var=Get-Item$x.FullName#$90var.Length$90Count=$90Count+1$90TotalSize=$90TotalSize+$90var.Length$90TotalSize/1Gb}# Over 60 days oldIf($y-gt60-and$x.PSIsContainer-ne$True){$60var=Get-Item$x.FullName#$60var.Length$60Count=$60Count+1$60TotalSize=$60TotalSize+$60var.Length$60TotalSize/1Gb}# Over 30 days oldIf($y-gt30-and$x.PSIsContainer-ne$True){$30var=Get-Item$x.FullName#$30var.Length$30Count=$30Count+1$30TotalSize=$30TotalSize+$30var....