I needed this during logon on Windows machines to set the sound volume: [WayBack] NirCmd – Windows command line tool set-soundvolume-25-percent.bat:
:: requires https://www.nirsoft.net/utils/nircmd.html
:: 100% = 65535
nircmd setsysvolume 16000
Works on all Windows versions (7-10) I tested so far.
Via
- [WayBack] bat volume settings
- [WayBack] winapi – How can I mute/unmute my sound from PowerShell – Stack Overflow
- [WayBack] keyboard shortcuts – How to control master volume in Windows 7? – Super User
There are way sexier ways to do this, but they were all too convoluted for the time I had to get this to work.
For the future:
- [WayBack] winapi – How can I mute/unmute my sound from PowerShell – Stack Overflow.
- [WayBack] How to code a batch file to set volume level?
- [WayBack] keyboard shortcuts – How to control master volume in Windows 7? – Super User
- [WayBack] windows – Change audio level from powershell? – Stack Overflow
- [WayBack] DeployHappiness | Setting Sound Volume and Unmuting with PowerShell
–jeroen