I have this, but as email command??
Option Explicit
Dim strComputer, objWMIService, colMonitoredDisks, objDiskChange
Dim i, strMessage
Const LOCAL_HARD_DISK = 3
strComputer = "West204"
Set objWMIService = GetObject("winmgmts:" &
"{impersonationLevel=impersonate,authenticationLev el=Pkt}!\\" & strComputer
& "\root\cimv2")
Set colMonitoredDisks = objWMIService.ExecNotificationQuery ("SELECT * FROM
__instancemodificationevent WITHIN 30 WHERE " & "TargetInstance ISA
'Win32_LogicalDisk'")
i = 0
Do While i = 0
Set objDiskChange = colMonitoredDisks.NextEvent
If objDiskChange.TargetInstance.DriveType = LOCAL_HARD_DISK Then
If objDiskChange.TargetInstance.Size < 100000000 Then
strMessage = "Hard disk " & objDiskChange.TargetInstance.Name
& " on computer " & strComputer & " is below 100,000,000 bytes."
End If
End If
Loop
"MiguelA" <> wrote in message
news:eJ$...
>I will try and tell you something
>
> "Pegasus [MVP]" <> wrote in message
> news:...
>> When you examine and run the script then you will see several things:
>> a) The script will inspect *all* drive letters.
>> b) The property oDrive.Path shows the drive letter (e.g. D
>> c) The property oDrive.AvailableSpace shows the amount of free space.
>>
>> You now need to compare oDrive.AvailableSpace against whatever limit you
>> wish to set, then invoke the EMail module if your free space drops below
>> the set limit.
>>
>>
>> "MiguelA" <> said this in news item
>> news:#...
>>> I do not understand is as if it detects that there is little space to
>>> run the email sending.
>>> If a server has multiple disks, it detects all?.
>>>
>>> "Pegasus [MVP]" <> wrote in message
>>> news:...
>>>>
>>>>
>>>> "MiguelA" <> said this in news item
>>>> news:86144BCB-29F3-43B4-AF6A-...
>>>>> I can not implement all the code!
>>>>
>>>> The idea is for you to grab the parts that are relevant for you. Feel
>>>> free to ask if certain details are unclear.
>>>>
>>>>
>>>>
>>>
>