Hi, I create a script :
Write-Host "<prtg>" foreach($volume IN gwmi -ComputerName "127.0.0.1" -Class win32_volume) { if ($volume.DriveType -eq 3) { $Driver = $volume.DriveLetter $freeSpace = $volume.freespace/1073741824; Write-Host "<result>" Write-Host "<channel>$Driver</channel>" Write-Host "<value>$freeSpace</value>" Write-Host "<float>1</float>" Write-Host "<showTable>1</showTable>" Write-Host "<showChart>1</showChart>" Write-Host "<unit>Go</unit>" Write-Host "<mode>Absolute</mode>" Write-Host "<warning>0</warning>" Write-Host "</result>" } } Write-Host "<prtg>"
So a don't have a result. Can you help me ?
Add comment