If I run regedit elevated I can manually change values on the below key:(DeviceState)
HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\MMDevices\Audio\Render{cbeade13-69b3-45e3-967e-bcd9b24ad4f7}'DeviceState’
If I try an elevated Powershell ISE Session locally at that Regi location :Set-ItemProperty -Path . -Name DeviceState -Value 1
I get
Set-ItemProperty : Requested registry access is not allowed.
At line:1 char:1
- Set-ItemProperty -Path . -Name DeviceState -Value 1
-
+ CategoryInfo : PermissionDenied: (HKEY_LOCAL_MACH...e-bcd9b24ad4f7}:String) [Set-ItemProperty], SecurityException + FullyQualifiedErrorId : System.Security.SecurityException,Microsoft.PowerShell.Commands.SetItemPropertyCommand
Is my issue here the ‘under the hood’ mechanics of how set-itemproperty is accessing the registry provider?