The Windows Operating System relies on changes made to the Registry.pol files to apply policies for user and computer based settings.
Symptoms: When policies are pushed successfully to a device but fail to apply, the typical cause is that the registry.pol file on the device has become corrupted.
About Registry.pol Files
There are two registry.pol files in the Windows OS, one for user, and one for machine settings. The respective files are located in the following directories:
- C:\windows\System32\GroupPolicy\Machine
- C:\windows\System32\GroupPolicy\User
JumpCloud policies are applied to the ‘Machine\registry.pol’ file. However, if you see policies applying unexpectedly that are not related to any JumpCloud policies bound to the machine, it is possible the ‘User\Registry.pol’ still contains policies applied by a previous solution, such as Active Directory Group Policy. Deleting these files and running a manual Group Policy Update will rebuild these files and reapply the necessary policies.
Removing Registry.pol Files Manually
To remove the registry.pol files manually on a Windows device:
- Delete the registry.pol files located in these directories:
- C:\windows\System32\GroupPolicy\Machine
- C:\windows\System32\GroupPolicy\User
- Then open a Windows Command Prompt and run the following command to rebuild the registry/pol files: GPUpdate /Force
The respective 'Registry.pol' will not repopulate if there are no policies applied to the Machine or User object.
Removing with PowerShell:
To remove the files using PowerShell, open an elevated PowerShell terminal and run the following commands:
Remove-Item -Path "C:\Windows\System32\GroupPolicy\Machine\registry.pol" -Force -ErrorAction SilentlyContinue
Remove-Item -Path "C:\Windows\System32\GroupPolicy\User\registry.pol" -Force -ErrorAction SilentlyContinue
gpupdate /force
Removing with JumpCloud Commands:
You can also use JumpCloud Commands to remove the files on affected devices:
- Create a new JumpCloud Windows PowerShell Command in your Admin Portal.
- Paste the following script into the Command and configure it to run on Windows devices experiencing policy application issues:
# Delete the registry.pol files
# Machine Policy
Remove-Item -Path "C:\Windows\System32\GroupPolicy\Machine\registry.pol" -Force -ErrorAction SilentlyContinue
# User Policy
Remove-Item -Path "C:\Windows\System32\GroupPolicy\User\registry.pol" -Force -ErrorAction SilentlyContinue
# Run a manual gpupdate
gpupdate /force