Skip to content

mkht/AudioVolumeDsc

Repository files navigation

AudioVolumeDsc

PowerShell DSC Resource to control audio volume.

Install

You can install Resource through PowerShell Gallery.

Install-Module -Name AudioVolumeDsc

Resources

  • AudioVolume PowerShell DSC Resource to control audio volume.

Properties

AudioVolume

  • [string] DeviceName (Key):

    • The name of the audio device.
    • You can use regular expression.
    • If more than one devices found, all devices are targeted for configuration.
  • [int] Volume (Required):

    • The target volume. (0 to 100)
  • [bool] Mute (Write):

    • The state of mute.
    • Default is $false
  • [bool] SkipWhenDeviceNotPresent (Write):

    • When this property is specied as $true, this resouce won't throw an error if the device is not found.
    • Default is $false

Examples

  • Example 1: Set the volume of the "Speaker" to 80.
Configuration Example1
{
    Import-DscResource -ModuleName AudioVolumeDsc
    AudioVolume Speaker80
    {
        DeviceName = 'Speaker'
        Volume = 80
        Mute = $false
    }
}

License

Copyright (c) 2020 mkht
AudioVolumeDsc is released under the MIT License
https://github.com/mkht/AudioVolumeDsc/blob/master/LICENSE

AudioVolumeDsc includes these software / libraries.

ChangeLog

v2.0.0

  • if multiple devices with the same name are found, all devices are targeted for configuration.
  • Devices in an inactive state are also targeted for configuration.
  • Update CoreAudio.dll (v1.16.0)

v1.0.0

  • First public release.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors