Get directory and child element details including folder count, file count, and the folder's total size. It also records the newest and oldest file (with age) in that folder. The folder you want to watch is the first (and only) script parameter which defaults to C:\Windows\Temp.
The component returns the following metrics
The template has been tested with Windows Server 2012-2019 using both the SolarWinds Orion Agent and using traditional WMI collection. This script relies that you organization/security team are not blocking "admin" shares on the remote machines [\\COMPUTERNAME\D$\Folder\File.txt].
Example screenshot assigned to node "EASTHYV01A" with script parameter "H:\Hyper-V":
@KMSigma this is great.. how can we make use of this in alerting for " when the folder is deleted" which i believe will be folder path existis in your above template.. but need to understand the alerting piece of it and usage...
This isn't really designed to be used for that level of monitoring. Server Configuration Monitor is a better fit for that.
However - the "Folder Path Exists" going to 0 (from 1, which is the default) would indicate that the folder has been deleted, renamed, or moved.
Since the PowerShell responses go into the "Multiple Statistics Data" for components, your alert logic should look something like this:
If this triggers, you're going to want to be VERY detailed about the alert, the server and the path so that the recipients understand what the alert is trying to say.
SolarWinds solutions are rooted in our deep connection to our user base in the THWACK® online community. More than 150,000 members are here to solve problems, share technology and best practices, and directly contribute to our product development process.