I am trying to get the script to add machines into the system tree in epo. I have done one to delete machines from system tree and another to check if a machine exist in ePO and return all the properties from the machine from ePO
I have found the following in the epo api scripting guide but it doesnt work
import mcafee, sys,inspect
file = open('C:/myfile.txt', 'r')
for line in file:
#determine the ID of the group to add it to
groups = mc.system.findGroups(line.rstrip('\n'))
groupId = -1
for group in groups:
if group['groupPath'] == 'My Organization\TEST':
groupId = group['groupId']
if groupId == -1:
error = 'Error finding the specified group.'
#now that we have the group id, pull in the systems from file
sourceId = "12"
sourceType = "CLI"
file = open('C:/systemsToAdd.txt', 'r')
for line in file:
sysProps = line.rstrip('\n').split(',')
# Contains line break at "\"
systemId = mc.detectedsystem.add(sourceId,sourceType,sysProps,sysProps,dnsName=sysProps,domain=sysProps)
I think it would be nice as it will have more visibility
I need this script working and after opening a case with McAfee still not answer.
Thanks for your help Ex-Brit
When you say you are "trying to get the script to add machines into the system tree in epo", do you mean there is nothing currently in your system tree, or have you used (in Server Settings) Active Directory Groups to initially populate your system tree, but are now trying to move devices elsewhere in the tree? Writing a script to do something which ePO can be easily configured to do sounds like hard work to me.
I need the script because we have a factory and we want that machines creates in factory automatically will be added in the ePO system tree and in a specific group depending of the clasification so we need this script.
I know we can use the ePO to added manually but we dont want as it is a job that need to be automatic
Are you sure you need a command for this?. If you in your factory have the local frameworkpackage MA installer with the local client communication keys, the system will be created automaticly just as well.
You can then afterwards set one of the 4 custom fields, and then use tagging to sort by your needs.
FrmInst.exe /CustomProps3="IT Department"