Function Utilization (strComputer,strDrive) Set objWMIService = GetObject("winmgmts://" & strComputer) strQuery="Select * from win32_logicaldisk where DeviceID='" & strDrive & "'" Set colWMI=objWMIService.ExecQuery(strQuery) For Each item In colWMI u=(item.size-item.freespace)/item.size Next Utilization=u End Function strDrive="G:" strComputer="localhost" iUsed=Utilization(strComputer,strDrive) 'display a warning if percent used is greater than 75% If iUsed > .75 Then WScript.Echo "WARNING: Drive " & strDrive & " on " &_ strComputer & " is at " & FormatPercent(iUsed) & " utilization" Else WScript.Echo "OK: Drive " & strDrive & " on " &_ strComputer & " is at " & FormatPercent(iUsed) & " utilization" End If