Tuesday, 27 February 2018

Treesize - Report to find large/stale files

https://www.jam-software.com/treesize/ 
https://www.jam-software.com/treesize/online_manual/EN/command_line_opt.html 
Treesize command line can easily produce file servers storage utilisation report to Excel spreadsheet with a tab for every volume to show utilisation data....see the following example:
 
To Configure:
1. Install Treesize on all fileservers
2. Set up scheduled task to run at 1am on the first day of the month on every fileserver to run following powershell script:
cd C:\Program Files\JAM Software\TreeSize
$date = Get-Date -format "dd-MM-yyyy"
$hostname = hostname
$drives = GET-WMIOBJECT win32_logicaldisk -filter "DriveType=3" | select -ExpandProperty deviceID
Foreach ($disk in $drives){
    ./Treesize.exe /AGEOFFILES /NOGUI /BARCHART /EXCEL "$($hostname)-$date.xls" $disk
}

No comments:

Post a Comment