Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Shared by Bob Hodges
- # Most of the script is from http://stackoverflow.com/questions/21355891/change-audio-level-from-powershell
- Function Set-Speaker($Volume){
- $wshShell = new-object -com wscript.shell;1..50 | % {$wshShell.SendKeys([char]174)};1..$Volume | % {$wshShell.SendKeys([char]175)}
- }
- try {Set-Speaker -Volume 50} #100% Volume
- catch {write-output "failed to set volume"}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement