frgnca / AudioDeviceCmdlets

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

Add support for ErrorAction argument #56

Open fiasko opened 2 years ago

fiasko commented 2 years ago

When Set-AudioDevice or Get-AudioDevice is called either with invalid Index number of device ID, the fuctions return a visible error and nothing else. Not even a $null value as a return value. When valid funtcion return value cant't be given (in case of error) it would be good to have a $null value as result, so that I could use these functions in my own scripts and detect when the calls failed. Also it would be good if the function could support '-ErrorAction' parameters as well, so that visible error messages could be suppressed.

God-damnit-all commented 2 years ago

While I'd like this too, I'm hoping 3.1 is released beforehand.