Hi Veronic Cassan,
Thank you for posting in the Microsoft Community Forums.
Use PowerShell scripts to back up and restore local group policies:
Before Sysprep, you could have used a PowerShell script to back up the local Group Policy settings for a specific user. However, since local Group Policies are mainly stored in system-level folders (such as C:\Windows\System32\GroupPolicy), they are usually not directly associated with user accounts. However, you can back up the associated registry entries and files because some settings of Group Policy are reflected in the registry.
You can try backing up the following folders and registry entries:
C:\Windows\System32\GroupPolicy
Relevant entries in the registry, such as HKEY_LOCAL_MACHINE\SOFTWARE\Policies
Note that direct manipulation of the registry and system files requires caution and making sure you have a recovery plan.
Recovering Group Policies:
After your system has been deployed, you can use the same PowerShell script to restore previously backed up Group Policy settings. This usually involves copying the backed up files and registry entries back to their original locations and may require restarting the computer or running the gpupdate /force command to apply the changes.
Use Group Policy Objects (GPOs) rather than local Group Policy:
If you are working in a domain environment, it may be a better choice to use domain-based Group Policy Objects (GPOs) rather than local Group Policies. With a GPO, you can set policies for specific users or groups of users and apply those policies uniformly across multiple computers. In this way, you avoid the problem of needing to reconfigure local Group Policies at each deployment.
Best regards
Neuvi Jiang