Disabling the audio output of a microphone while maintaining it's input with powershell

1.4k views Asked by At

In the system I am working with, there is a device (Yeti Nano0 which is intended to be Microphone only but is read as both a microphone and a speaker. I have been tasked with finding a way to automatically disable the speaker section while maintaining the microphone.
My organization is currently able to do this manually by going into device manager on each computer and disabling it in the audio output section so we know it's possible to do. Below is a list of solutions tired, their PowerShell script, and errors:

  1. Disabling it as a pnp audio output
    • Get-PnpDevice -FriendlyName “Speakers (Yeti Nano)” | Disable-PnpDevice
      • "Speakers (Yeti Nano)" is the name of the audio output
    • It would tell me it was successful and but would not work
  2. Disabling it as pnp media
    • Get-PnpDevice -FriendlyName “Yeti Nano” | Disable-PnpDevice
      • "Yeti Nano" is the name as a media device
    • Worked but would disable both the speaker and microphone
  3. Using AudioDeviceCmdlets module from Github (src: https://github.com/frgnca/AudioDeviceCmdlets)
    • Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force; Install-Module -name AudioDeviceCmdlets Get-AudioDevice -List | where Type -like "Playback" | where name -notlike "Speaker (Yeti Nano)" | Set-AudioDevice -Verbose

    • Does work but is unreliable because it undefaults it instead of disabling. When device is unplugged and plugged back in it sets itself to default

Any solutions are welcome!

0

There are 0 answers