How to Changing Registry Settings with Ansible Windows 10

I am working as an Automation Developer. I have been trying to disable a microphone via automation for a few days now. I’m using Ansible and attempting to change the registry setting. It’s a simple thing changing from 10000000 to 10000001 or 128 to 129. I’ve attempted the following:

-name: disable mic
  win_regedit: 
    path: HKLM:\path to registry
    name: DeviceState
    value: 129
    (also have used data and type but none of that worked)

Here I get that I cannot access the registry. So I gave win_regmerge a shot:

-name: disable mic
  win_regmerge:
    path: C:\path\to-my-working-reg-file

I get an Error accessing the registry. Am I just screwed and unable to run these registry changes. I am running as administrator. I’m not sure what else to do here. Any help would be appreciated. p.s. I have attempted using PowerShell with the reg file and it says it’s not a cmdlet. I have made a batch file to run the reg file but it just spins as it’s waiting for admin confirmation. when using PowerShell I can use -confirm: $false not an option with the bat file. The only other thing I could think of was to run a bat file, of a PowerShell file of the .reg file…but that’s kind of ridiculous & probably won’t work.

Thanks & Regards
Camillelola

You might have better luck on an ansible or Windows forum…

Okay…Thanks for your reply.