Hey fellas,
I have a Powershell Script that´s doing some tasks on a ePO 5.9.1.
One of these parts is tagging systems with a supplied TAG.
We were successful using it with systemnames but now are in the need of using the Agent GUID.
According to the API itselt it says:
OK: system.applyTag names tagName Assigns the given tag to a supplied list of systems. System list can contain names, IP addresses or IDs. Requires Tag use permission Parameters: [names (param 1) | ids] - You need to either supply the "names" with a comma-separated list of names/ip addresses or a comma-separated list of "IDs". [tagName (param 2) | tagID] - You need to either supply the tag name or the tag ID.
So we can either suppy the systems with names=SYSTEMNAME or with ids=ID.
As I found no other IDs and the GUID makes absolutely sense in the meaning of being unique I asume that the GUID is meant here.
https://ePO-IP:Port/remote/system.applyTag?ids=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX&tagName=test
I always get the following error:
Error 0 : For input string: "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX"
The string is correct and when searched in ePO leads me to the corresponding system.
Doing the part manually direct in the browser gives me the same result: Error.
Any ideas?
Solved! Go to Solution.
Was my reply helpful?
If this information was helpful in any way or answered your question, will you please select Accept as Solution in my reply and together we can help other members?
To add to this, the ID you want can be found using the system.find command: the ID is returned as the "System Location" value.
Was my reply helpful?
If this information was helpful in any way or answered your question, will you please select Accept as Solution in my reply and together we can help other members?
To add to this, the ID you want can be found using the system.find command: the ID is returned as the "System Location" value.
Here is an URL example where API executeQuery is pulling the information ready for the applyTag API.
It is the "EPOLeafNode.AutoID" which can be used for tagging based on "ids". The result is provide as json
https://<epo>:8443/remote/core.executeQuery?target=EPOLeafNode&select=(select%20EPOLeafNode.AutoID%20EPOLeafNode.NodeName%20EPOLeafNode.LastUpdate%20EPOLeafNode.AgentGUID%20EPOComputerProperties.UserName%20EPOLeafNode.Tags%20EPOBranchNode.NodeTextPath2%20EPOComputerProperties.UserProperty2%20EPOComputerProperties.UserProperty3%20EPOProdPropsView_UDLP.productversion%20)&where=(+and+(+version_ge+EPOProdPropsView_UDLP.productversion+%2211%22+)+(+eq+EPOComputerProperties.OSPlatform+%22Workstation%22)))&:output=json
Example of PowerShell function invoking the ePO API
New to the forums or need help finding your way around the forums? There's a whole hub of community resources to help you.
Thousands of customers use our Community for peer-to-peer and expert product support. Enjoy these benefits with a free membership: