Posted on 12-16-2021 02:53 AM
Hi Guys,
We are just starting out with Jamf Pro, and I am impressed, mostly.
The service is hosted primarily on the Cloud, with (currently) one local distribution point that is limited to distributing to Macs that are physically within our network.
The problem is replication. For the past few months, I've been running Jamf Admin on my local Mac, and replicating manually (usually daily). Our central systems team have asked if this replication can be automated, and run from one of our servers. Unfortunately, these are *all* windows machines.
I'm happy to script something, as I do have a fair amount of experience of Windows scripting, but does anyone have any guides on how this can be done? I know how to copy things to the DP (which is just a standard Windows server, with SMB access), I just need to know how to get access to the packages on the cloud, possibly with the Jamf Pro APIs..
Posted on 12-16-2021 07:22 AM
I know this is possible to do, because in a past job someone I worked with created a PowerShell script that did this. I no longer have a copy of that script anywhere unfortunately, or I would post a sanitized version of it here for you.
But from what I remember, it mounted both shares (Master and Replica) and then performed an rsync to make the replica match the master. There was of course a bit more to it than just that, but that was the gist. We actually had several distribution points, so the script would go through and mount each replica one at a time and perform the rsync on each until they were all done and then exit.
We had it running about every 8 hours if I'm not mistaken, although it escapes me now how we made it run automatically. Something on the Windows server would kick it off based on a schedule. We could also remote into the Windows server and call the script manually in the cmd line shell if we didn't want to wait until it ran at the next scheduled time.