These demonstate some useful fragments which might hopefully save you hours trying to recreate.
The available tips or samples are:
Group policy can be dumped with the free MS "GPRESULT.EXE" tool.