Category filter

Script to adjust master volume on Windows devices

When used in public spaces like kiosks or shared workstations, it is required to set predefined audio levels for devices. IT admins may need to adjust the device volume to an optimum level, for instance, in smart classrooms and conference room digital signage installations. On Windows PCs, the user should modify the master volume to change all sounds. The volume for individual apps and system sounds can then be configured as a percentage of the master volume.
Admins can use the PowerShell script provided below to remotely modify the master volume on Windows devices with the help of Hexnode’s Execute Custom Script action.

Disclaimer:


The sample scripts provided below are adapted from third-party open-source sites.

Script to set the master volume

The script given above installs the AudioDeviceCmdlets module and uses it to set the device’s master volume to the desired value. Set the variable $preferredVolume to the necessary volume level. (Replace 42 with the required volume.)

To confirm whether the script has worked, you can check the Action History tab of the corresponding devices.

View output of script to modify audio levels under Action History tab

Notes:

  • It is recommended to manually validate the script execution on a system before executing the action in bulk.
  • Hexnode will not be responsible for any damage/loss to the system on the behavior of the script.

  • Sample Script Repository