New Ranks & Badges For The Community!
Notice something different? The ranks and associated badges have gone "Star Fleet". See what they all mean HERE
Absent Member.. Absent Member..
Absent Member..

Scheduled task policy


I wish to monitor a certain commands output from a agent host. Lets say for example that I want to run the command ipconfig and the output is as:

Windows IP Configuration

Ethernet adapter Local Area Connection:

   Connection-specific DNS Suffix  . :
   Link-local IPv6 Address . . . . . : fe80::7068:b11f:4fdb:c221%10
   IPv4 Address. . . . . . . . . . . :
   Subnet Mask . . . . . . . . . . . :
   Default Gateway . . . . . . . . . :

There I want to make sure that the line starting with "Default Gateway" has a string "".

I am able to use Scheduled Task policy to run a Command, VB Script or Perl Script. So running ipconfig command as Command is easy but I then I cannot use or search the output for any patterns.

I am not that familiar with VB or Perl scripts. I know how to create a simple VBScript which runs the ipconfig command and creates a output file put how to get the output to OMi and search the pattern and create a event if pattern is found or not found is beyond me. Here is the VBScript I created:

Dim objShell
Set objShell = WScript.CreateObject ("") "cmd /K CD C:\ & ipconfig > c:\temp\output.txt"
Set objShell = Nothing

Any help on how to achieve this?

Appreciate the help!



Labels (1)
2 Replies
Fleet Admiral Fleet Admiral
Fleet Admiral

best approach would be to use logfile monitoring policy with preprocessing option. preprocessing allow you to run any command/script whose output can be redirected to a text file like you are redirecting it to output.txt, you can also create a logfile from your script and then read this logfile for pattern matching purpose.


this screenshot is taken from OMW server but other than GUI there should not be any difference in configuring from OMI.


Cadet 2nd Class Cadet 2nd Class
Cadet 2nd Class


To achieve this kind of monitoring, SPI for Systems Infrastructure product has the capability of monitoring command outputs with the policy Change Configuration Monitor. Currently this feature is available with Infrastructure SPI, not with Infra MP.

If you provide the command which you want to monitor to this policy, If there is any change in output, then policy will alert you with the changes.

The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.