HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\MMDevices\Audio\Capture\{fb397776-518e-4d12-9ba6-2087011c782e}\FxProperties
I am trying to modify a property's value on that registry key but I am getting error
Requested registry access is not allowed.
When I try to set a rule for ACL on this key, I am getting the same error.
I am trying with this code
$ke = Get-Acl $KeyFxProperties.PSPath
$rule = New-Object System.Security.AccessControl.RegistryAccessRule("BUILTIN\ADMINISTRATORS","FullControl","Allow")
ke.SetAccessRule($rule)
$ke |Set-Acl -Path $KeyFxProperties.PSPath