Submit a ticketCall us
Home > Success Center > Server & Application Monitor (SAM) > SAM - Knowledgebase Articles > Directory Size Monitor error: Quota Violation

Directory Size Monitor error: Quota Violation

Updated July 25, 2018


This article provides a resolution for the error "Quota Violation" that you can receive when you are using SolarWinds SAM to monitor a directory that is too large (for example, 50 TB or larger).


  • SAM, all versions
  • Monitor applied to any directory that is 50 TB or larger


This is a limitation of the out-of-the-box directory size monitor/file count monitor applications due to Windows directory reporting limitations.


  1. Build a custom PowerShell script monitor.
  2. Use this code to monitor the directory size:
$dirPath = $args[0]
$dirContents = (Get-ChildItem $dirPath -Recurse | Measure-Object -Property Length -sum)
$dirSize = [math]::Round(($dirContents.sum / 1TB), 3)
Write-Host("Statistic: " + $dirSize)

If the rounding is not necessary at all, replace the mentioned row with the following:

$dirSize = $dirContents.sum / 1TB

If you'd like to monitor the drive in a different value such as "B", "KB", "MB", "GB", "TB", "PB" then you will need to update the code accordingly.


This will format the output to a TB base unit, with 1 GB precision.

Add directory path as script argument. For example:
This is a work-around solution that is not technically supported because it involves a custom script.
If this solution does not work for you then you will have to build your own custom script or reach out to other SolarWinds users through our community website


Last modified