Some commands are more commonly used than others. To create scripts quickly, we recommend that you familiarize yourself with the syntax for these common commands.
These tables list commonly used commands with their syntax and description. Each table covers a different functional area.
Note
Specify arguments followed by
=<>by name. For example, the argumentfullName=must be included in this command,core.addUser("ga", "ga", fullName="Joe Tester")
Command | Syntax | Description |
|---|---|---|
| core.executeQuery queryId [database=<>] core.executeQuery target=<> [select=<>] [where=<>] [order=<>] [group=<>] [database=<>] [depth=<>] [joinTables=<>] | Executes a query and returns the results as a list of objects. |
| core.help [command] [prefix=<>] | Lists all registered commands, and displays help strings. |
| core.listDatabases | Returns all databases the user is permitted to see as a list of objects. |
| core.listQueries | Returns all queries the user is permitted to see as a list of objects. |
| core.listTables [table=<>] | Returns all database tables the user is permitted to see as a list of objects. |
| policy.find searchText | Finds all policies that the user is permitted to see that match the given search text. |
| repository.find searchText | Finds all repositories that the user is permitted to see that match the given search text. |
| system.find searchText | Finds systems in the System Tree. |
Command | Syntax | Description |
|---|---|---|
| core.addUser userName password [fullName=<>] [email=<>] [phoneNumber=<>] [notes=<>] [disabled=<>] [admin=<>] core.addUser userName=<> windowsUserName=<> windowsDomain=<> [fullName=<>] [email=<>] [phoneNumber=<>] [notes=<>] [disabled=<>] [admin=<>] core.addUser userName=<> subjectDN=<> [fullName=<>] [email=<>] [phoneNumber=<>] [notes=<>] [disabled=<>] [admin=<>] | Adds a user to the system. Authentication parameters are mutually exclusive: either |
| core.importPermissionSets file [overwrite] | Imports permission sets from a file. |
| core.exportPermissionSets | Exports all permission sets as an XML string. |
| system.importSystem fileName branchNodeID [allowDuplicates] [uninstallRemoved] [pushAgent][pushAgentForceInstall] [pushAgentSkipIfInstalled] [pushAgentSuppressUI][pushAgentInstallPath] [pushAgentPackagePath] [pushAgentDomainName][pushAgentUserName] [pushAgentPassword] [deleteIfRemoved][createNewInLostAndFound] [flattenTreeStructure | Imports systems from a text file or a supplied comma-separated list. |
| repository.checkInPackage packageLocation branch [option] [moveToPrevious] [allowUnsignedPackages] | Checks package into the master repository. |
Command | Syntax | Description |
|---|---|---|
| core.updateUser userName [password=<>] [windowsUserName=<>] [windowsDomain=<>] [subjectDN=<>] [newUserName=<>] [fullName=<>] [email=<>] [phoneNumber=<>] [notes=<>] [disabled=<>] [admin=<>] | Updates an existing user. Authentication parameters are mutually exclusive: either password, windowsUserName/windowsDomain, or subjectDN can be specified. |
| core.addPermSetsForUser userName permSetName | Adds the given permission set to the specified user. |
| system.applyTag names tagName | Assigns the given tag to a supplied list of systems. |
| system.setUserProperties name [description] [customField1] [customField2] [customField3] [customField4] | Sets user properties on the given system. |
| system.deployAgent names username [password] [agentPackage] [skipIfInstalled] [suppressUI] [forceInstall] [installPath] [domain] [useAllHandlers] [primaryAgentHandler] [retryIntervalSeconds] [attempts] [abortAfterMinutes] [includeSubgroups] [useSsh] [inputSource] | Deploys an agent to the given list of systems. |
| policy.assignToSystem names productId typeId objectId [resetInheritance] | Assigns the policy to a supplied list of systems. |
Command | Syntax | Description |
|---|---|---|
| clienttask.run names productId taskID [retryAttempts] [retryIntervalInSeconds] [abortAfterMinutes] [useAllAgentHandlers] [stopAfterMinutes] [randomizationInterval] | Runs the client task on a supplied list of systems. |
| scheduler.cancelServerTask taskLogId | Ends a currently running task. |
| scheduler.runServerTask taskName | Runs the specified server task. |
| system.wakeupAgent names [fullProps] [superAgent] [randomMinutes] [forceFullPolicyUpdate] [useAllHandlers] [retryIntervalSeconds] [attempts] [abortAfterMinutes] [includeSubgroups] | Wakes up the agent on a supplied list of systems. |
| repository.pull sourceRepository targetBranch [moveToPrevious] [productList] | Pulls packages from the source repository. |
Command | Syntax | Description |
|---|---|---|
| commonevent.purgeEvents queryId [unit] | Deletes threat events based on age or a queryId. The query must be table-based. |
| core.purgeAuditLog [age] [unit] | Purges the audit log by age. |
| system.delete names [uninstall] | Deletes systems from a ePO server by name or ID. |
| tasklog.purge [age] [unit] | Purges the task log by age. Defaults to purging all entries. |