Posted on 04-21-2020 04:01 AM
I'm looking at collapsing all the sites into "None" in our Jamf Pro server.
Just wondering if anyone has done something like that? The API looks like it might be able to do this.
Basically I think I need to iterate through all the computers and change the site to "-1" and the id to "None"
Is anyone able to give me some pointers?
Regards,
David
Solved! Go to Solution.
Posted on 04-21-2020 06:10 PM
@dlondon - do a search for computers, click the Action button at the bottom right, then Edit the Site. Jamf Migrator should also be able to do the trick. Before doing anything you'll want to ensure you don't change the configuration on your machines with a site change. For example, if a configuration profile is scoped to all machines in a site and they're moved out of that site the profile will get removed.
Posted on 04-21-2020 04:54 AM
Love to know if there's a way without api
Posted on 04-21-2020 06:18 AM
So I've found this nice example by @anverhousseini to iterate the computers https://www.jamf.com/jamf-nation/discussions/28384/api-extracting-data-modifying-it-and-putting-it-back-using-loop
so that's a good starting point
Posted on 04-21-2020 06:10 PM
@dlondon - do a search for computers, click the Action button at the bottom right, then Edit the Site. Jamf Migrator should also be able to do the trick. Before doing anything you'll want to ensure you don't change the configuration on your machines with a site change. For example, if a configuration profile is scoped to all machines in a site and they're moved out of that site the profile will get removed.
Posted on 04-21-2020 11:43 PM
@dlondon good idea..I will give that a try.
Thanks!!
Posted on 04-21-2020 11:44 PM
@leslie I definitely owe you a coffee or two! You made my day - that is definitely the way to do this via Search in Jamf Pro.
Yes I have to check a lot of stuff to rationalise it - especially Policies. Config Profiles however were never scoped to sites so that isn't a problem.
Thank you