Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
A

AudioDeviceCmdlets

> 编程语言
Open source

AudioDeviceCmdlets is a suite of PowerShell Cmdlets to control audio devices on Windows

920 stars0 likes1 views
WebsiteGitHub

About

AudioDeviceCmdlets is a suite of PowerShell Cmdlets to control audio devices on Windows

Description

AudioDeviceCmdlets is a suite of PowerShell Cmdlets to control audio devices on Windows

Features

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)

Installation

Run as administrator

powershell
Install-Module -Name AudioDeviceCmdlets

Usage

…
…
…

Build Cmdlet from source

Build instructions

  1. Install Visual Studio 2022

     Workloads: .NET desktop development
    
  2. 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
    
  3. Set project properties
    Project -> AudioDeviceCmdlets Properties

     Assembly name: AudioDeviceCmdlets
     Target framework: .NET Framework 4.6.1+
    
  4. 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+
    
  5. Set solution configuration
    Build -> Configuration Manager...

     Active solution configuration: Release
    
  6. Build Cmdlet
    Build -> Build Solution

     AudioDeviceCmdlets\SOURCE\bin\Release\AudioDeviceCmdlets.dll
    
  7. Import Cmdlet to PowerShell on Windows

    powershell
    $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 AudioDeviceCmdlets

Donation

Thank you for considering a donation

Bitcoin		(BTC) 3AffczXX4Jb2iN8QWQhHQAsj9AqGFXgYUF
BitcoinCash	(BCH) qraf6a3fklta7xkvwkh49zqn6mgnm2eyz589rkfvl3
Ethereum	(ETH) 0xE4EA2A2356C04c8054Db452dCBd6f958F74722dE

Attribution

Based 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

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

C#audioc-sharppowershellpowershell-cmdlets

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言