Hi, everyone
I hope to deny the full control permission of administrator account on registry key named as "HKCU:\Control Panel\Keyboard".
I have some failed PowerShell command codes, please you correct them.
Thanks a lot.
The failed PowerShell command codes as following.

$acl = Get-Acl 'HKCU:\Control Panel\Keyboard'
$acl.Access
$idRef = [System.Security.Principal.NTAccount]("DESKTOP-R5J32KL\USER")
$regRights = [System.Security.AccessControl.RegistryRights]:eny
$inhFlags = [System.Security.AccessControl.InheritanceFlags]::None
$acType = [System.Security.AccessControl.AccessControlType]:eny
$rule = New-Object System.Security.AccessControl.RegistryAccessRule ($idRef, $regRights, $inhFlags, $prFlags, $acType)
$acl.AddAccessRule($rule)
$acl.SetAccessRule($rule)
$acl | Set-Acl -Path 'HKCU:\Control Panel\Keyboard'

First picture as attached is my registry key information.
How to Deny Full Control of this Registry Key?-deny-full-control-permission.jpg
Second picture as attached is PowerShell registry key information.
How to Deny Full Control of this Registry Key?-first-information-screen-mine.jpg
Third picture as attached is total PowerShell errors.
How to Deny Full Control of this Registry Key?-total-errors.jpg
Last picture as attached is the final result, and nothing happened.
How to Deny Full Control of this Registry Key?-nothing-happened.jpg