home *** CD-ROM | disk | FTP | other *** search
- ' This script checks that the amount of free space on c: drive is 250mb.
- ' It could check other discs too. Version 1.1
-
-
- Dim WshSHell
- set WshShell = CreateObject("WScript.Shell")
-
- dim s1,s2
- dim fs1
-
- for each Disk in GetObject("winmgmts:").InstancesOf ("CIM_LogicalDisk")
- d=disk.deviceid
-
- if d="C:" then
- fs=Disk.freeSPace
- fs=fs / (1024 * 1024)
-
- fs1=round(fs,0)
- s1="SERVER1-C-has-" & fs1 & "-mb-free"
-
- ' wscript.echo s1
-
- if fs<250 then
- WshShell.Run("NetHDSendStatus service=00004 status=FAULT smtpserver=localhost smtprecipient=helpdesk@cnetis.co.uk subject=SERVICESTATUS message=DiscSpaceProblem")
- else
- WshShell.Run("NetHDSendStatus service=00004 status=OK smtpserver=localhost smtprecipient=helpdesk@cnetis.co.uk subject=SERVICESTATUS message=DiscSpaceOK")
- end if
- end if
-
- next
-