Loading
Scriptbox
 VBScript Links 
 About VBscript 
 JavaScript Links 
 About JavaScript 
 Powershell Links 
 PSCRIPT the Script Launcher 
 PowerShell Shortcut Keys 
 About Powershell 
     VBScript
    JavaScript
    Powershell
Disclaimer
Contact
Latest 10 Scripts
Script search
  :: { Category } :: 0-9ABCDEFGHIJKLMNOPQRSTUVWXYZ
         

Search Options:  Suppress  Multiple  Event  Notifications  

 Content of Suppress Multiple Event Notifications.vbs
MD5 Hash: FD134D72E3F2157456552815205DB196
' Description: Issues an alert if available space on a disk drive falls below 100 megabytes. Will wait one hour before issuing the next alert.


dtmStartTime = Now
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")

Set objDiskDrives = objWMIService.ExecQuery _
("Select * from Win32_LogicalDisk")

For Each objDrive in objDiskDrives
If objDrive.FreeSpace < 10000000 Then
Wscript.Echo "Drive is low on disk space."
End If
Next

Do
Set objDiskDrives = objWMIService.ExecQuery _
("Select * from Win32_LogicalDisk")
For Each objDrive in objDiskDrives
If objDrive.FreeSpace < 10000000 Then
intElapsedHours = DateDiff("h", dtmStartTime, Now)
If intElapsedHours >= 1 Then
Wscript.Echo "Drive is low on disk space."
dtmStartTime = Now
End If
End If
Next
Wscript.Sleep 1000
Loop

   © 2008 - 2013 Boris Toll      :: Scripts available: 6.481 ::      :: scriptbox.toll.at ::      :: powered by www.toll.at ::
  Google Entries:n/a
  Yahoo Backlinks:n/a
  Live Backlinks:n/a
  del.icio.us Bookmarks:n/a
  Technorati Links:n/a