Was using the following script, but cant get any space information past the overall size, which is \ifs. when trying the full path i cant get any information back.
# Example Powershell Monitor Parameters:
# \\fileshare.solarwinds.com\reports\
param ( [Parameter(Mandatory=$true)]
[string]$share)
$drive = (New-Object -com scripting.filesystemobject).getdrive("share")
$free = ($drive.FreeSpace / 1GB)
$free = [math]::Round($free,2)
$total = ($drive.TotalSize / 1GB)
$total = [math]::Round($total,2)
$used = ($total - $free)
$used = [math]::Round($used,2)
$usedP = ($used / $total)*100
$usedP = [math]::Round($usedP)
$freeP = ($free / $total)*100
$freeP = [math]::Round($freeP)
Write-Host "Message.totalGB: Total Disk Space: $total GB"
Write-Host "Statistic.totalGB: $total"
Write-Host "Message.freeGB: Free Disk Space: $free GB"
Write-Host "Statistic.freeGB: $free"
Write-Host "Message.usedGB: Used Disk Space: $used GB"
Write-Host "Statistic.usedGB: $used"
Write-Host "Message.freeP: Free Disk Space: $freeP %"
Write-Host "Statistic.freeP: $freeP"
Write-Host "Message.usedP: Used Disk Space: $usedP %"
Write-Host "Statistic.usedP: $usedP"