I am Looking for event which is for low disk storage whenever system reaches 80 % need to give the custom notification is any event available for this ,I found 2013 event is for low storage but I am not seen this event in my eventviewer any idea from you guys?
Low Disk storage Detection
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.

Prasad RaveendranRank #320 · 7.8K reputationPosted Dec 26, 2023, 4:04 PM EST
Here's an example of how you can modify the PowerShell script to log low disk space events into the Event Viewer:
$driveLetter = 'C:' # Change this to your desired drive letter $threshold = 80 # Change this to your desired threshold percentage $disk = Get-WmiObject -Class Win32_LogicalDisk | Where-Object { $_.DeviceID -eq $driveLetter } $freeSpacePercentage = [math]::Round(($disk.FreeSpace / $disk.Size) * 100, 2) if ($freeSpacePercentage -le (100 - $threshold)) { $message = "Low disk space! Drive $driveLetter has $freeSpacePercentage% free space remaining." # Create a new event log entry in the Application log $eventParams = @{ LogName = 'Application' Source = 'MyDiskSpaceMonitor' EventId = 1001 # You can use any valid Event ID here EntryType = 'Warning' Message = $message } New-EventLog @eventParams }