AudioDeviceCmdlets is a suite of PowerShell Cmdlets to control audio devices on Windows
AudioDeviceCmdlets is a suite of PowerShell Cmdlets to control audio devices on Windows
AudioDeviceCmdlets is a suite of PowerShell Cmdlets to control audio devices on Windows
Get list of all audio devices
Get default audio device (playback/recording)
Get default communication audio device (playback/recording)
Get volume and mute state of default audio device (playback/recording)
Get volume and mute state of default communication audio device (playback/recording)
Set default audio device (playback/recording)
Set default communication audio device (playback/recording)
Set volume and mute state of default audio device (playback/recording)
Set volume and mute state of default communication audio device (playback/recording)
Run as administrator
Install-Module -Name AudioDeviceCmdlets………Build instructions
Install Visual Studio 2022
Workloads: .NET desktop development
Create new project from SOURCE folder
File -> New -> Project From Existing Code...
Type of project: Visual C#
Folder: SOURCE
Name: AudioDeviceCmdlets
Output type: Class Library
Set project properties
Project -> AudioDeviceCmdlets Properties
Assembly name: AudioDeviceCmdlets
Target framework: .NET Framework 4.6.1+
Install System.Management.Automation NuGet legacy package
Project -> Manage NuGet Packages...
Package source: nuget.org
Browse: Microsoft.PowerShell.5.1.ReferenceAssemblies
Install: v1.0.0+
Set solution configuration
Build -> Configuration Manager...
Active solution configuration: Release
Build Cmdlet
Build -> Build Solution
AudioDeviceCmdlets\SOURCE\bin\Release\AudioDeviceCmdlets.dll
Import Cmdlet to PowerShell on Windows
$FilePath = "C:\Path\To\AudioDeviceCmdlets\SOURCE\bin\Release\AudioDeviceCmdlets.dll"
New-Item "$($profile | split-path)\Modules\AudioDeviceCmdlets" -Type directory -Force
Copy-Item $FilePath "$($profile | split-path)\Modules\AudioDeviceCmdlets\AudioDeviceCmdlets.dll"
Set-Location "$($profile | Split-Path)\Modules\AudioDeviceCmdlets"
Get-ChildItem | Unblock-File
Import-Module AudioDeviceCmdletsThank you for considering a donation
Bitcoin (BTC) 3AffczXX4Jb2iN8QWQhHQAsj9AqGFXgYUF
BitcoinCash (BCH) qraf6a3fklta7xkvwkh49zqn6mgnm2eyz589rkfvl3
Ethereum (ETH) 0xE4EA2A2356C04c8054Db452dCBd6f958F74722dEBased on code originally posted to Code Project by Ray Molenkamp with comments and suggestions by MadMidi
http://www.codeproject.com/Articles/18520/Vista-Core-Audio-API-Master-Volume-Control
Based on code originally posted to GitHub by Chris Hunt
https://github.com/cdhunt/WindowsAudioDevice-Powershell-Cmdlet
No open issues yet, or sync has not completed.