Showing results for 
Search instead for 
Did you mean: 

Python Script to apply TAG

Hey guys what's up?

I'm having some issues in the bellow script. I need to apply a specific tag to some hosts (System Name) which are spreaded in various groups. To do it I'm using a txt file:

import mcafee_epo
mc = mcafee_epo.Client('epo server address','8443','user','password')

file = open('workstation0.txt', 'r')
for line in file:
      mc.system.applyTag(line.rstrip('\n'), 'tag name')


But my in output I'm getting this error:

            mc.System.applyTag(line.rstrip('\n'), 'tag name')
AttributeError: 'Client' object has no attribute 'System'

Does anyone have a better idea? I appreciate it


1 Reply
Reliable Contributor vnaidu
Reliable Contributor
Report Inappropriate Content
Message 2 of 2

Re: Python Script to apply TAG


May be you try downloading the content from the below link, which has the information you are looking for.

More McAfee Tools to Help You
  • Subscription Service Notification (SNS)
  • How-to: Endpoint Removal Tool
  • Support: Endpoint Security
  • eSupport: Policy Orchestrator