A powerful PowerShell disk scanner that goes beyond traditional tree-size tools:
Key Features:
- Ultra-fast scanning using USN Journal / MFT enumeration
- Smart 3-stage duplicate detection (Size → xxHash64 → Full Compare)
- Intelligent cleanup suggestions (temp files, logs, cache, old installers)
- Beautiful HTML reports with interactive charts
- Dynamic memory management for handling massive filesystems
- Top folders, file types, and wasted space analysis
- Configurable thresholds and display limits
Built for system administrators, MSPs, and power users who need to understand where disk space is going—fast.
Install-Module -Name UltraTree -Scope CurrentUser# Run as Administrator - installs system-wide (required for NinjaOne/SYSTEM account)
git clone https://github.com/freezscholte/UltraTree.git "$env:TEMP\UltraTree"
Copy-Item -Path "$env:TEMP\UltraTree\Module\src\UltraTree" -Destination "$env:ProgramFiles\WindowsPowerShell\Modules\UltraTree" -Recurse -Force
Remove-Item -Path "$env:TEMP\UltraTree" -Recurse -Force
Import-Module UltraTree -Force# Scan C: drive
Get-FolderSizes -DriveLetter C
# Scan all drives with duplicate detection
Get-FolderSizes -AllDrives -FindDuplicates -MaxDepth 5 -Top 50
# Full pipeline - scan, convert, wrap, save as standalone HTML
Get-FolderSizes -AllDrives -FindDuplicates |
ConvertTo-NinjaOneHtml |
New-HtmlWrapper -Title "Disk Report" |
Out-File "DiskReport.html" -Encoding UTF8UltraTree is designed for NinjaOne RMM. Set the HTML report directly to a WYSIWYG custom field:
# Basic - auto-installs if needed
if (-not (Get-Module -ListAvailable -Name UltraTree)) {
Install-Module -Name UltraTree -Scope AllUsers -Force -AllowClobber
}
Import-Module UltraTree -Force
Get-FolderSizes -AllDrives -FindDuplicates |
ConvertTo-NinjaOneHtml |
Ninja-Property-Set-Piped treesize#Requires -Version 5.1
#Requires -RunAsAdministrator
try {
$moduleName = "UltraTree"
$installed = Get-Module -ListAvailable -Name $moduleName | Sort-Object Version -Descending | Select-Object -First 1
if (-not $installed) {
Write-Output "Installing $moduleName..."
Install-Module -Name $moduleName -Scope AllUsers -Force -AllowClobber
}
else {
$latest = Find-Module -Name $moduleName -ErrorAction SilentlyContinue
if ($latest -and $latest.Version -gt $installed.Version) {
Write-Output "Updating $moduleName to $($latest.Version)..."
Update-Module -Name $moduleName -Force
}
}
Import-Module $moduleName -Force -ErrorAction Stop
Get-FolderSizes -AllDrives -FindDuplicates -MaxDepth 5 -Top 50 |
ConvertTo-NinjaOneHtml |
Ninja-Property-Set-Piped treesize
exit 0
}
catch {
Write-Error "UltraTree failed: $_"
exit 1
}- All parameters and options
- Return object structure
- NinjaOne setup guide (custom fields, scripts, scheduling, alerts)
- Configuration reference
- Troubleshooting
- PowerShell 5.1+
- Windows (NTFS drives)
- Administrator privileges for full access
Jan Scholte
MIT License