wanna make a push to talk script with powershell

hi guys. how the thread is going to be i need a script on powershell and im completly bad with that thing right now.

so i need a push to talk in discord cuz sometimes discord hotkeys not working always idk why and these programs like “SoundSwitch.exe” not working in all games idk why.

Anyway i know that powershell scripts have more permission on windows using.

And i dont have the best room for talk with mates and friends so i need a push to talk with powershell… who can i just press one time the MMousebutton to deactivate my mic and toggle with MMousebutton again to activate it.

Disable-PnpDevice -InstanceId ‘ROOT\SOUND__VIDEO_AND_GAME_CONTROLLERS\0000’

Start-Sleep -Seconds 5

Enable-PnpDevice -InstanceId ‘ROOT\SOUND__VIDEO_AND_GAME_CONTROLLERS\0000’

something like that but im so bad with pwshell and i hope someone can help me here for a pushtotalk script