Move all computers to new site

dlondon
Valued Contributor

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

1 ACCEPTED SOLUTION

leslie
Contributor II
Contributor II

@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.

View solution in original post

5 REPLIES 5

Rohitds14
New Contributor III

Love to know if there's a way without api

dlondon
Valued Contributor

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

leslie
Contributor II
Contributor II

@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.

Rohitds14
New Contributor III

@dlondon good idea..I will give that a try.
Thanks!!

dlondon
Valued Contributor

@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