Set Registry Permissions

Description:

This function will take ownership of a registry key as a specified user and set access rights to full control. This is a useful function to call in other scripts when you get ‘Access Denied’ when trying to modify certain keys in the registry.

To Resolve:

1a. Before:


2. After running ‘Set-RegkeyPermissions -RegistryKey “HKCU:\Gerry\NoAccess” -Username “gerry”‘

 

This script can be found in the gwConfiguration section.