# Modify Audio Source with powershell

You need this module

#--- install module ---
Install-Module -Name AudioDeviceCmdlets -Force -Verbose
get-module -Name "AudioDeviceCmdlets" -ListAvailable | Sort-Object Version | select -last 1 | Import-Module -Verbose

3 exemples

#--- set audio device ---

Get-AudioDevice -List | where Type -like "Playback" | where name -like "Casque (Arctis 7 Game)" | Set-AudioDevice -Verbose 

Get-AudioDevice -List | where Type -like "Playback" | where name -like "Haut-parleurs (USB Audio Device)" | Set-AudioDevice -Verbose 

Get-AudioDevice -List | where Type -like "Playback" | where name -like "Enceintes (Realtek(R) Audio)" | Set-AudioDevice -Verbose