Frustrated with Windows default audio device changing?

You can include PowerShell commands to change the default device (for playback and recording) using PowerShell

Using this GitHub project https://github.com/jtheller/AudioDeviceCmdlets/tree/ce0bd480e96e934621c5ca6f846a65830c1a74d3

I found this useful when using a DVI Extender that would change the default audio to itself even though it required the main sound card to provide the audio into it.

Just install using the script below

#region Install code, just run once
$url='https://github.com/frgnca/AudioDeviceCmdlets/releases/download/v3.0/AudioDeviceCmdlets.dll'
$location = ($profile | split-path)+ "\Modules\AudioDeviceCmdlets\AudioDeviceCmdlets.dll"
New-Item "$($profile | split-path)\Modules\AudioDeviceCmdlets" -Type directory -Force
(New-Object System.Net.WebClient).DownloadFile($url, $location)
#endregion

#run this or add it to your profile so the module is always imported
Import-Module AudioDeviceCmdlets

#List current audio devices
Get-AudioDevice -List | select Index,Default,Type,Name| ft

Output:

AudioDevices

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s