I'm experiencing an issue where the PVS write cache file is growing excessively, consuming too much space on the drive. Does anyone have suggestions on how to track what is using up space on a PVS write cache drive? I know I can use Process Monitor to identify the cause, but I can't run it all day on my target devices. I found the script below, which I can set up as a scheduled task to trigger when the drive space drops below a certain threshold, but I wanted to see if anyone had other recommendations. # Set threshold (in GB)
$thresholdGB = 2
$drive = "D:"
$logPath = "\\fileserver\ProcMonLogs\"
$procmonPath = "C:\Tools\Procmon.exe" # Update with your actual path
# Check free space
$freeGB = (Get-PSDrive $drive.TrimEnd(':')).Free / 1GB
if ($freeGB -lt $thresholdGB) {
$timestamp = Get-Date -Format "yyyyMMdd_HHmmss"
$output = "$logPath$($env:COMPUTERNAME)_$timestamp.pml"
# Start ProcMon with filter for D: and WriteFile operations, run for 10 minutes
Start-Process -FilePath $procmonPath -ArgumentList "/Minimized /Quiet /Backingfile $output /Filter Path BEGINS $drive\ Operation IS WriteFile /Terminate /Runtime 600"
}