Can you post what you’re trying to do exactly? A lot of folks here are willing to help (myself included) pro bono. We just want to see people succeed!
I agree with @Chubs. From what it sounds like this could easily be done with a tool like The Mut without the need for any scripting.
https://apps.apple.com/us/app/mut/id1133234759?mt=12
My District is almost at the tail end of the device refresh.
Used MUT to preassign devices to students.
One thing to note:
If you have Jamf Account enabled in your server, you’ll need to create a local Jamf account and give it necessary permissions (modify, etc) for MUT to function.
Another note: MUT hates when you have a “ ‘ “ character in person’s name. It will crash instantly.
For those accounts, I’ve updated them manually via the Jamf Pro Admin Console. The reset used the spreadsheets with pre-populated information for name, username, building, asset number, etc.
You can also leverage this to add or remove devices from groups.
Create a group, then look up the unique group ID.
Works quite well.