Closed Trikster-Online closed 2 years ago
What version of Jamf Pro are you using? The reason I'm asking is that if you're using 10.34.2 or earlier, which doesn't support using Bearer Tokens for Classic API authentication, set the NoBearerToken
variable to the following value
as shown below:
# NoBearerToken="yes"
By default, it is set to the following value:
# NoBearerToken=""
Here ya go! All I added to the script was the URL of my Jamf Cloud instance...changed nothing else.
VERSION 10.37.2-t1648851072
For the URL of your Jamf Pro instance, did you add this?
whatever.jamfcloud.com
Or this?
https://whatever.jamfcloud.com
The reason I'm asking is that it needs to be https://whatever.jamfcloud.com
.
Yep, it's the full URL...https://crcyadayada:8443... We can do a Zoom if you want to see it in action.
No, thank you. Please try running an unaltered copy of my script, which should prompt you for the URL, the username of the Jamf Pro account you're using and the password.
Error persists.
I messed around with the URL by removing the port 8443 and got the following...
Please enter your Jamf Pro server URL : https://crcURL.edu
Please enter your Jamf Pro user account :
Please enter the password for the account:
Please see below for the list of categories available on https://crcURL.edu
(nothing displayed, this was where I initially got the parser error)
Please enter the name of the category: to be deleted
/Users/w0859768/Desktop/Scripts/RemovePolicies.sh: line 222: ((: == 0 : syntax error: operand expected (error token is "== 0 ") /Users/w0859768/Desktop/Scripts/RemovePolicies.sh: line 227: ((: > 0 : syntax error: operand expected (error token is "> 0 ") An unknown error occurred. Exiting.
It has to be the correct URL, including the port number if the port number is something other than 443.
I'm not able to replicate the errors you're seeing on my end, though it may be a permissions issue. Please try this:
Administrator
privilege set (see screenshot for details).Now that is interesting. The account I was using is a local admin account. I created one just like it, and that one worked. Any idea what would make the other one not work?
I'll leave that part of the investigation to you. I'm glad to hear that it's now working for you.
When I run this script, I get the following error... I don't know enough about scripting to know how to fix...
-:1: parser error : Document is empty