...
Grouper can export a folder or the entire registry as a GSH script. This is currently experimental, take a backup or verify in a test env first. In order to run the script you need a Grouper v2.2.2+ patched env.
The script is idempotent (run it twice, its ok). It will not delete what is there in general though it will delete attribute assignments on exported assignments.
...