How to change GUIDs on a cloned drive?

I’ll note here that @dtgriscom has posted an updated version of his script in a new thread: