Change sound device's volume with or without toast notification. Expects use with task scheduler.
Windows Powershell 5.x on Windows10 64bit.
- Not tested with Powershell Core (> 6.0).
Invoke-VolumeChange [config filepath]
Invoke-VolumeChange conf.json
cd /path/to/vlchg
using module "VolumeChange/VolumeChange.psm1"
Invoke-VolumeChange conf.json
JSON based text like below.
{
"vlchg": [
{
"range": [
"06:00",
"21:00"
],
"vol": 54,
"toast": false,
"toastparam" : {}
},
{
"range": [
<snip>
-
range:
array of 2 strings, which values are times as 24-hour notation.
-
vol:
int, volume value. 0 to 100.
-
toast:
boolean, enable toast notification.
-
toastparam:
not used
vlchg.vbs
- run Invoke-VolumeChange
- run without display window
- module install required
vlchg.xml
- taskscheduler import sample
- run vlgch.vbs every 70 minits periodically
- need to update ageinst target environment:
- UserId
- Command
- WorkingDirectory