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 10.0.0.10 - 10.0.0.20 and print out
# the computer name and the agent version

echo "" > output;
for ((i=10;i<=20;i++))
do
    # -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
done
jq "[.[] | { Agent: .AgentHostName, Version: .Version }]" output | grep -v "null" | grep -A 1 "Agent"

Sample Output

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

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>