frgnca / AudioDeviceCmdlets

AudioDeviceCmdlets is a suite of PowerShell Cmdlets to control audio devices on Windows
MIT License
743 stars 92 forks source link

Added NoToggle param to Mute cmdlet #8

Closed FearNotDaniel closed 7 years ago

FearNotDaniel commented 8 years ago

Hi there - please forgive the intrusion, I've never contributed a pull request to any project before so I'm not sure if I'm out of order by sending this unsolicited. However I wanted to offer my thanks for this project which I've found extremely useful. There's one use case where I wanted the Set-DefaultAudioDeviceMute command to always mute the sound, not toggle it on and off, so I've added this -NoToggle switch parameter which does the trick for me. This is in the attached pull request: if you're happy to accept it I don't mind also contributing a change to the help document. Cheers! Daniel

cdhunt commented 8 years ago

I think there is a more PowerShell-y way to accomplish this using an optional parameter.

Set-DefaultAudioDeviceMute -Mute $true or Set-DefaultAudioDeviceMute -Mute $false wound force it to that state, but omitting the switch would just toggle.

cdhunt commented 7 years ago

Closing this in favor of #14. Thank you.