Hi Everyone,
Am very much a newbie when it comes to VBScripting.
And having troubles understanding how to use/understand WMI to inspect Windows services (fist time I've had a requirement to do so in my limited scripting experience).
I'm trying to perform the following ... (please excuse my crude framework summary below)
Checking for the existence of files I've done before.
It's the WMI Operations that I really need assistance with if possible.
I typically run 'cscript /nologo .\[scriptname].vbs'
If there's anyone that can assist and or point me to a good source to learn how to understand vb scripting relative to WMI Operations, it would be greatly appreciated.
Thanks in advance.
Cheers,
Cameron.
Am very much a newbie when it comes to VBScripting.
And having troubles understanding how to use/understand WMI to inspect Windows services (fist time I've had a requirement to do so in my limited scripting experience).
I'm trying to perform the following ... (please excuse my crude framework summary below)
Code:
FOR Each RUNNING Service of "iComBookingImport?" do (eg: iComBookingImport1 / iComBookingImport5 )
- Check Existence of iComBookingImport? Log file
(eg: iComBookingImport1_20171208.txt | iComBookingImport?_[ccyymmdd].txt )
+ IF NOT found - Continue to next iteration
+ IF FOUND ...
: LOOP though BookingImport? Log file to last line
: Check if last line contains string "Error: Out of memory"
: IF FALSE - COntinue to next iteration
: IF TRUE ...
= Send EMAIL to multiple Users/Distribution lists
= STOP Service "iComBookingImport?"
= Wait five(5) seconds
= START Service "iComBookingImport?"
: END-LOOP
END-FORIt's the WMI Operations that I really need assistance with if possible.
I typically run 'cscript /nologo .\[scriptname].vbs'
If there's anyone that can assist and or point me to a good source to learn how to understand vb scripting relative to WMI Operations, it would be greatly appreciated.
Thanks in advance.
Cheers,
Cameron.