Skip to content

MartinGC94/AudioConfig

Repository files navigation

AudioConfig

This PowerShell module allows you to manage various settings for audio devices and audio sessions on Windows. The available options include: Volume level (Master, per channel, per session), device role, name, input/output device for sessions and more. It's built on top of the core audio APIs listed here: https://learn.microsoft.com/en-us/windows/win32/api/_coreaudio/

Getting started

Install the module from the PowerShell gallery: Install-Module AudioConfig
Then check the available commands in the module: Get-Command -Module AudioConfig
Here's a few example of what can be done with this module:

# Disable all devices that are not standard speakers/microphones
Get-AudioDevice | where FormFactor -NotIn Speakers, Microphone | Set-AudioDevice -Disabled

# Set the default communication device to a specific device
Set-AudioDevice '{0.0.0.00000000}.{3dec2c4f-ea08-470d-861e-ac8c17e1c571}' -Role Communications

# Set the volume level for all firefox sessions to 50%
Get-AudioDevice | Get-AudioSession | where DisplayName -Like *Firefox | Set-AudioSession -VolumeLevel 50

# Set a custom output device for all firefox sessions
Get-AudioDevice | Get-AudioSession | where DisplayName -Like *Firefox | Set-AudioSession -OutputDeviceId '{0.0.0.00000000}.{3dec2c4f-ea08-470d-861e-ac8c17e1c571}'

About

PowerShell module for configuring Windows audio settings.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published