Feature Request: SMB Share Monitor

Viewed 0

I'd like to request a Monitor to validate the availability of Windows or SMB file shares.

--Joel

1 Answers

Well, this seemed like a good time to start working with the PowerShell object model for PA.

I wrote this script that looks at the SYSYVOL share on a monitored DC, but it can easily be adapted to work against a generic file share by changing the path in the $Folder variable. It'd be a simple task to change the path to a Custom Property if that works better for you.

$Mon.FireActions = $False
$Name = $Mon.ComputerName
$Mon.Details = ""
$Folder = "\\" + $Name + "\Sysvol"

If ((Test-Path $Folder) -eq $False)
{
  $Mon.FireActions = $true
  $Mon.Details = "SYSVOL is not accessible on " + $Name
}
Else
{
  $Mon.Details = "SYSVOL is accessible on " + $Name
  $Mon.FireActions = $False
}
Related