AudioDeviceCmdlets 3.0.0.2

The owner has unlisted this package. This could mean that the package is deprecated, has security vulnerabilities or shouldn't be used anymore.
dotnet add package AudioDeviceCmdlets --version 3.0.0.2
NuGet\Install-Package AudioDeviceCmdlets -Version 3.0.0.2
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="AudioDeviceCmdlets" Version="3.0.0.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add AudioDeviceCmdlets --version 3.0.0.2
#r "nuget: AudioDeviceCmdlets, 3.0.0.2"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install AudioDeviceCmdlets as a Cake Addin
#addin nuget:?package=AudioDeviceCmdlets&version=3.0.0.2

// Install AudioDeviceCmdlets as a Cake Tool
#tool nuget:?package=AudioDeviceCmdlets&version=3.0.0.2

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 volume and mute state of default audio device (playback/recording)
Set default audio device (playback/recording)
Set volume and mute state of default audio device (playback/recording)

Import Cmdlet to PowerShell

Download <a href="https://github.com/frgnca/AudioDeviceCmdlets/releases/download/v3.0/AudioDeviceCmdlets.dll">AudioDeviceCmdlets.dll</a>

New-Item "$($profile | split-path)\Modules\AudioDeviceCmdlets" -Type directory -Force
Copy-Item "C:\Path\to\AudioDeviceCmdlets.dll" "$($profile | split-path)\Modules\AudioDeviceCmdlets\AudioDeviceCmdlets.dll"
Set-Location "$($profile | Split-Path)\Modules\AudioDeviceCmdlets"
Get-ChildItem | Unblock-File
Import-Module AudioDeviceCmdlets

Usage

Get-AudioDevice -List             # Outputs a list of all devices as <AudioDevice>
                -ID <string>      # Outputs the device with the ID corresponding to the given <string>
                -Index <int>      # Outputs the device with the Index corresponding to the given <int>
		-Playback         # Outputs the default playback device as <AudioDevice>
                -PlaybackMute     # Outputs the default playback device's mute state as <bool>
                -PlaybackVolume   # Outputs the default playback device's volume level on 100 as <float>
                -Recording        # Outputs the default recording device as <AudioDevice>
                -RecordingMute    # Outputs the default recording device's mute state as <bool>
                -RecordingVolume  # Outputs the default recording device's volume level on 100 as <float>
Set-AudioDevice <AudioDevice>             # Sets the default playback/recording device to the given <AudioDevice>, can be piped
                -ID <string>              # Sets the default playback/recording device to the device with the ID corresponding to the given <string>
                -Index <int>              # Sets the default playback/recording device to the device with the Index corresponding to the given <int>
                -PlaybackMute <bool>      # Sets the default playback device's mute state to the given <bool>
                -PlaybackMuteToggle       # Toggles the default playback device's mute state
                -PlaybackVolume <float>   # Sets the default playback device's volume level on 100 to the given <float>
                -RecordingMute <bool>     # Sets the default recording device's mute state to the given <bool>
                -RecordingMuteToggle      # Toggles the default recording device's mute state
                -RecordingVolume <float>  # Sets the default recording device's volume level on 100 to the given <float>
Write-AudioDevice -PlaybackMeter  # Writes the default playback device's power output on 100 as a meter
                  -PlaybackSteam  # Writes the default playback device's power output on 100 as a stream of <int>
                  -RecordingMeter # Writes the default recording device's power output on 100 as a meter
                  -RecordingSteam # Writes the default recording device's power output on 100 as a stream of <int>

Build Cmdlet from source

  1. Using Visual Studio Community, 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
    
  2. Install System.Management.Automation NuGet package
    Project → Manage NuGet Packages...

     Browse: System.Management.Automation
     Install: v6.3+
    
  3. Set project properties
    Project → AudioDeviceCmdlets Properties...

     Assembly name: AudioDeviceCmdlets
     Target framework: .NET Framework 4.5+
    
  4. Set solution configuration
    Build → Configuration Manager...

     Active solution configuration: Release
    
  5. Build Cmdlet
    Build → Build AudioDeviceCmdlets

     AudioDeviceCmdlets\bin\Release\AudioDeviceCmdlets.dll
    

Attribution

Based on code 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 posted to GitHub by Chris Hunt
https://github.com/cdhunt/WindowsAudioDevice-Powershell-Cmdlet

Product Compatible and additional computed target framework versions.
.NET Framework net45 is compatible.  net451 was computed.  net452 was computed.  net46 was computed.  net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated

Package v3.0 for NuGet publication