Querying McAfee ePo on End User Machines

Code loop through a range of IPs and query McAfee epo on client machines

# Loop through IP address - and print out
# the computer name and the agent version

echo "" > output;
for ((i=10;i<=20;i++))
    # -s   Silent Curl
    # -m 1 Wait no longer than 1 second per host
    curl -s -m 1 "http://10.0.0.${i}:8081/LoadProductNames" >> output
jq "[.[] | { Agent: .AgentHostName, Version: .Version }]" output | grep -v "null" | grep -A 1 "Agent"

Sample Output

   "Agent": "computer01",
    "Version": ""
    "Agent": "computer02",
    "Version": ""
    "Agent": "computer03",
    "Version": ""
    "Agent": "computer04",
    "Version": ""
    "Agent": "computer05",
    "Version": ""

Leave a Reply

To create code blocks or other preformatted text, indent by four spaces:

    This will be displayed in a monospaced font. The first four 
    spaces will be stripped off, but all other whitespace
    will be preserved.
    Markdown is turned off in code blocks:
     [This is not a link](http://example.com)

To create not a block, but an inline code span, use backticks:

Here is some inline `code`.

For more help see http://daringfireball.net/projects/markdown/syntax

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>