{"id":13597602,"url":"https://github.com/frgnca/AudioDeviceCmdlets","last_synced_at":"2025-04-10T01:31:03.727Z","repository":{"id":4726902,"uuid":"5875492","full_name":"frgnca/AudioDeviceCmdlets","owner":"frgnca","description":"AudioDeviceCmdlets is a suite of PowerShell Cmdlets to control audio devices on Windows","archived":false,"fork":false,"pushed_at":"2023-04-30T22:25:13.000Z","size":215,"stargazers_count":780,"open_issues_count":29,"forks_count":93,"subscribers_count":34,"default_branch":"master","last_synced_at":"2024-12-02T03:55:29.522Z","etag":null,"topics":["audio","c-sharp","powershell","powershell-cmdlets"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/frgnca.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2012-09-19T17:30:08.000Z","updated_at":"2024-11-21T18:54:40.000Z","dependencies_parsed_at":"2023-07-11T09:01:46.166Z","dependency_job_id":null,"html_url":"https://github.com/frgnca/AudioDeviceCmdlets","commit_stats":{"total_commits":73,"total_committers":4,"mean_commits":18.25,"dds":0.589041095890411,"last_synced_commit":"26d08d30e9d804c016c994117f9b038b7d50da95"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frgnca%2FAudioDeviceCmdlets","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frgnca%2FAudioDeviceCmdlets/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frgnca%2FAudioDeviceCmdlets/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frgnca%2FAudioDeviceCmdlets/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/frgnca","download_url":"https://codeload.github.com/frgnca/AudioDeviceCmdlets/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248140271,"owners_count":21054269,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["audio","c-sharp","powershell","powershell-cmdlets"],"created_at":"2024-08-01T17:00:37.025Z","updated_at":"2025-04-10T01:30:58.689Z","avatar_url":"https://github.com/frgnca.png","language":"C#","funding_links":[],"categories":["C# #"],"sub_categories":[],"readme":"## Description\nAudioDeviceCmdlets is a suite of PowerShell Cmdlets to control audio devices on Windows\n\n\n## Features\nGet list of all audio devices  \nGet default audio device (playback/recording)  \nGet default communication audio device (playback/recording)  \nGet volume and mute state of default audio device (playback/recording)  \nGet volume and mute state of default communication audio device (playback/recording)  \nSet default audio device (playback/recording)  \nSet default communication audio device (playback/recording)  \nSet volume and mute state of default audio device (playback/recording)  \nSet volume and mute state of default communication audio device (playback/recording)\n\n\n## Installation\nRun as administrator\n```PowerShell\nInstall-Module -Name AudioDeviceCmdlets\n```\n\n\n## Usage\n```PowerShell\nGet-AudioDevice -ID \u003cstring\u003e\t\t\t# Get the device with the ID corresponding to the given \u003cstring\u003e\nGet-AudioDevice -Index \u003cint\u003e\t\t\t# Get the device with the Index corresponding to the given \u003cint\u003e\nGet-AudioDevice -List\t\t\t\t# Get a list of all enabled devices as \u003cAudioDevice\u003e\nGet-AudioDevice -PlaybackCommunication\t\t# Get the default communication playback device as \u003cAudioDevice\u003e\nGet-AudioDevice -PlaybackCommunicationMute\t# Get the default communication playback device's mute state as \u003cbool\u003e\nGet-AudioDevice -PlaybackCommunicationVolume\t# Get the default communication playback device's volume level on 100 as \u003cfloat\u003e\nGet-AudioDevice\t-Playback\t\t\t# Get the default playback device as \u003cAudioDevice\u003e\nGet-AudioDevice -PlaybackMute\t\t\t# Get the default playback device's mute state as \u003cbool\u003e\nGet-AudioDevice -PlaybackVolume\t\t\t# Get the default playback device's volume level on 100 as \u003cfloat\u003e\nGet-AudioDevice -RecordingCommunication\t\t# Get the default communication recording device as \u003cAudioDevice\u003e\nGet-AudioDevice -RecordingCommunicationMute\t# Get the default communication recording device's mute state as \u003cbool\u003e\nGet-AudioDevice -RecordingCommunicationVolume\t# Get the default communication recording device's volume level on 100 as \u003cfloat\u003e\nGet-AudioDevice -Recording\t\t\t# Get the default recording device as \u003cAudioDevice\u003e\nGet-AudioDevice -RecordingMute\t\t\t# Get the default recording device's mute state as \u003cbool\u003e\nGet-AudioDevice -RecordingVolume\t\t# Get the default recording device's volume level on 100 as \u003cfloat\u003e\n```\n```PowerShell\nSet-AudioDevice\t\u003cAudioDevice\u003e\t\t\t\t# Set the given playback/recording device as both the default device and the default communication device, for its type\nSet-AudioDevice \u003cAudioDevice\u003e -CommunicationOnly\t# Set the given playback/recording device as the default communication device and not the default device, for its type\nSet-AudioDevice \u003cAudioDevice\u003e -DefaultOnly\t\t# Set the given playback/recording device as the default device and not the default communication device, for its type\nSet-AudioDevice -ID \u003cstring\u003e\t\t\t\t# Set the device with the ID corresponding to the given \u003cstring\u003e as both the default device and the default communication device, for its type\nSet-AudioDevice -ID \u003cstring\u003e -CommunicationOnly\t\t# Set the device with the ID corresponding to the given \u003cstring\u003e as the default communication device and not the default device, for its type\nSet-AudioDevice -ID \u003cstring\u003e -DefaultOnly\t\t# Set the device with the ID corresponding to the given \u003cstring\u003e as the default device and not the default communication device, for its type\nSet-AudioDevice -Index \u003cint\u003e\t\t\t\t# Set the device with the Index corresponding to the given \u003cint\u003e as both the default device and the default communication device, for its type\nSet-AudioDevice -Index \u003cint\u003e -CommunicationOnly\t\t# Set the device with the Index corresponding to the given \u003cint\u003e as the default communication device and not the default device, for its type\nSet-AudioDevice -Index \u003cint\u003e -DefaultOnly\t\t# Set the device with the Index corresponding to the given \u003cint\u003e as the default device and not the default communication device, for its type\nSet-AudioDevice -PlaybackCommunicationMuteToggle\t# Set the default communication playback device's mute state to the opposite of its current mute state\nSet-AudioDevice -PlaybackCommunicationMute \u003cbool\u003e\t# Set the default communication playback device's mute state to the given \u003cbool\u003e\nSet-AudioDevice -PlaybackCommunicationVolume \u003cfloat\u003e\t# Set the default communication playback device's volume level on 100 to the given \u003cfloat\u003e\nSet-AudioDevice -PlaybackMuteToggle\t\t\t# Set the default playback device's mute state to the opposite of its current mute state\nSet-AudioDevice -PlaybackMute \u003cbool\u003e\t\t\t# Set the default playback device's mute state to the given \u003cbool\u003e\nSet-AudioDevice -PlaybackVolume \u003cfloat\u003e\t\t\t# Set the default playback device's volume level on 100 to the given \u003cfloat\u003e\nSet-AudioDevice -RecordingCommunicationMuteToggle\t# Set the default communication recording device's mute state to the opposite of its current mute state\nSet-AudioDevice -RecordingCommunicationMute \u003cbool\u003e\t# Set the default communication recording device's mute state to the given \u003cbool\u003e\nSet-AudioDevice -RecordingCommunicationVolume \u003cfloat\u003e\t# Set the default communication recording device's volume level on 100 to the given \u003cfloat\u003e\nSet-AudioDevice -RecordingMuteToggle\t\t\t# Set the default recording device's mute state to the opposite of its current mute state\nSet-AudioDevice -RecordingMute \u003cbool\u003e\t\t\t# Set the default recording device's mute state to the given \u003cbool\u003e\nSet-AudioDevice -RecordingVolume \u003cfloat\u003e\t\t# Set the default recording device's volume level on 100 to the given \u003cfloat\u003e\n```\n```PowerShell\nWrite-AudioDevice -PlaybackCommunicationMeter\t# Write the default playback device's power output on 100 as a meter\nWrite-AudioDevice -PlaybackCommunicationStream\t# Write the default playback device's power output on 100 as a stream of \u003cint\u003e\nWrite-AudioDevice -PlaybackMeter\t\t# Write the default playback device's power output on 100 as a meter\nWrite-AudioDevice -PlaybackStream\t\t# Write the default playback device's power output on 100 as a stream of \u003cint\u003e\nWrite-AudioDevice -RecordingCommunicationMeter\t# Write the default recording device's power output on 100 as a meter\nWrite-AudioDevice -RecordingCommunicationStream\t# Write the default recording device's power output on 100 as a stream of \u003cint\u003e\nWrite-AudioDevice -RecordingMeter\t\t# Write the default recording device's power output on 100 as a meter\nWrite-AudioDevice -RecordingStream\t\t# Write the default recording device's power output on 100 as a stream of \u003cint\u003e\n```\n\n\n## Build Cmdlet from source\n\n\n\u003cdetails\u003e\n  \u003csummary\u003eBuild instructions\u003c/summary\u003e\n\n1. Install Visual Studio 2022\n\n\t\tWorkloads: .NET desktop development\n\n2. Create new project from SOURCE folder  \nFile -\u003e New -\u003e Project From Existing Code...\n\n\t\tType of project: Visual C#\n\t\tFolder: SOURCE\n\t\tName: AudioDeviceCmdlets\n\t\tOutput type: Class Library\n\n3. Set project properties  \nProject -\u003e AudioDeviceCmdlets Properties\n\n\t\tAssembly name: AudioDeviceCmdlets\n\t\tTarget framework: .NET Framework 4.6.1+\n\n4. Install System.Management.Automation NuGet legacy package  \nProject -\u003e Manage NuGet Packages...\n\n\t\tPackage source: nuget.org\n\t\tBrowse: Microsoft.PowerShell.5.1.ReferenceAssemblies\n\t\tInstall: v1.0.0+\n\n5. Set solution configuration  \nBuild -\u003e Configuration Manager...\n\n\t\tActive solution configuration: Release\n\n6. Build Cmdlet  \nBuild -\u003e Build Solution\n\n\t\tAudioDeviceCmdlets\\SOURCE\\bin\\Release\\AudioDeviceCmdlets.dll\n\n7. Import Cmdlet to PowerShell on Windows\n\t```PowerShell\n\t$FilePath = \"C:\\Path\\To\\AudioDeviceCmdlets\\SOURCE\\bin\\Release\\AudioDeviceCmdlets.dll\"\n\tNew-Item \"$($profile | split-path)\\Modules\\AudioDeviceCmdlets\" -Type directory -Force\n\tCopy-Item $FilePath \"$($profile | split-path)\\Modules\\AudioDeviceCmdlets\\AudioDeviceCmdlets.dll\"\n\tSet-Location \"$($profile | Split-Path)\\Modules\\AudioDeviceCmdlets\"\n\tGet-ChildItem | Unblock-File\n\tImport-Module AudioDeviceCmdlets\n\t```\n\u003c/details\u003e\n\n\n## Donation\n\n\u003cdetails\u003e\n  \u003csummary\u003eThank you for considering a donation\u003c/summary\u003e\n\n\tBitcoin\t\t(BTC) 3AffczXX4Jb2iN8QWQhHQAsj9AqGFXgYUF\n\tBitcoinCash\t(BCH) qraf6a3fklta7xkvwkh49zqn6mgnm2eyz589rkfvl3\n\tEthereum\t(ETH) 0xE4EA2A2356C04c8054Db452dCBd6f958F74722dE\n\u003c/details\u003e\n\n\n## Attribution\n\nBased on code originally posted to Code Project by Ray Molenkamp with comments and suggestions by MadMidi  \nhttp://www.codeproject.com/Articles/18520/Vista-Core-Audio-API-Master-Volume-Control  \nBased on code originally posted to GitHub by Chris Hunt  \nhttps://github.com/cdhunt/WindowsAudioDevice-Powershell-Cmdlet  \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrgnca%2FAudioDeviceCmdlets","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffrgnca%2FAudioDeviceCmdlets","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrgnca%2FAudioDeviceCmdlets/lists"}