Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Monitor Free Space on HDDs

Status
Not open for further replies.

ChadJK

IS-IT--Management
Nov 10, 2005
14
0
0
US
Is there a way to configure Windows to monitor hard disk free space and send an administrative alert when there is less than x MBs or x % free space?
 
As markdmac will tell you, "you can do just about anything with VB Script".

Microsoft has an excellent library of pre-written VB scripts at your disposal. If you run it on a regular basis as a task, you should get what you want. Here's an example from the script center i found in less than a minute. Cut and paste it with what you need for sending an email (no doubt an example exists for this too)


strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colDisks = objWMIService.ExecQuery _
("Select * from Win32_LogicalDisk")
For each objDisk in colDisks
Wscript.Echo "Compressed: " & vbTab & objDisk.Compressed
Wscript.Echo "Description: " & vbTab & objDisk.Description
Wscript.Echo "DeviceID: " & vbTab & objDisk.DeviceID
Wscript.Echo "DriveType: " & vbTab & objDisk.DriveType
Wscript.Echo "FileSystem: " & vbTab & objDisk.FileSystem
Wscript.Echo "FreeSpace: " & vbTab & objDisk.FreeSpace
Wscript.Echo "MediaType: " & vbTab & objDisk.MediaType
Wscript.Echo "Name: " & vbTab & objDisk.Name
Wscript.Echo "QuotasDisabled: " & vbTab & objDisk.QuotasDisabled
Wscript.Echo "QuotasIncomplete: " & vbTab & objDisk.QuotasIncomplete
Wscript.Echo "QuotasRebuilding: " & vbTab & objDisk.QuotasRebuilding
Wscript.Echo "Size: " & vbTab & objDisk.Size
Wscript.Echo "SupportsDiskQuotas: " & vbTab & _
objDisk.SupportsDiskQuotas
Wscript.Echo "SupportsFileBasedCompression: " & vbTab & _
objDisk.SupportsFileBasedCompression
Wscript.Echo "SystemName: " & vbTab & objDisk.SystemName
Wscript.Echo "VolumeDirty: " & vbTab & objDisk.VolumeDirty
Wscript.Echo "VolumeName: " & vbTab & objDisk.VolumeName
Wscript.Echo "VolumeSerialNumber: " & vbTab & _
objDisk.VolumeSerialNumber
Next



Start, Help. You'll be surprised what's there. A+/MCP/MCSE/MCDBA
 
You could set an Alert to monitor free disk space in the "Performance" mmc. Add the logical disk counters and it will monitor and alert you through net send or email( using blat or somethimg similar).

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top