Open SGNTP opened 8 years ago
Hi @SGNTP, Sorry for the delayed response on this.
I see two issues going on here, but really its the first one that is likely the problem. I see from your script output that it looks like you tried to run the script through Casper Remote, If so, this script isn't designed to be run from any kind of Casper policy, because it pops up an Applescript window asking for the Computer Group selection to be converted to an ARD list. The error syntax error: A identifier can’t go after this “"”
is coming from Applescript and is because it can't execute the osascript call to send up the dialog.
Try running the script manually in Terminal and you'll see what I mean.
The parser error : Document is empty
errors later on are coming from xmllint
, which takes incoming xml and formats it in a way that makes it easier to get specific lines in the xml. The issue is that since its not getting an xml from the curl command before it, it generates that parser error. But again, this is all because of how you're trying to run the script it seems.
Commenting again, I see you mentioned getting the same error from Terminal. If so, what I'd check is the API account permissions. Make sure it has READ access to Computer Groups (Smart and Static) and Computers. It needs all of those at a minimum to work.
Hi Mike,
Very thankful for all the work you do that helps me to do better and learn new things!
Environment: Cloud-hosted JAMF
Is it possible to edit the script and get the "Reported IP Address" from the API?
When I run search in API (Computer/ID), this is what returns:
<ip_address>63.xxx.xxx.xxx</ip_address>
<last_reported_ip>10.xxx.xxx.x</last_reported_ip>
Editing the script to use last_reported_ip or LAST_REPORTED_IP did not return any information.
Hi Mike,
Thanks for all the hard work you do - you probably hear it often but we mean it! When you have time could you check out this consistent error I get when using this script:
The resulting plist looks like so:
I get the same output when running it from the Terminal. Whats baffling me is the syntax error which I gather isn't happening on other JSS and OS version for other people.