I am trying to adjust the PC volume back to 100 % through PowerShell, but although it works in PowerGUI, I can't get it working in OSA.
I thought it was a permission issue in Win 7 64-Bit, so set the OSA Service to run as an Administrator, but nothing.
Anyone have any ideas? (My garage door stood open the whole night

I am using this in PowerGui successfully:
Code: Select all
Function Set-Speaker($Volume)
{$wshShell = new-object -com wscript.shell;1..50 | % {$wshShell.SendKeys([char]174)};1..$Volume | % {$wshShell.SendKeys([char]175)}}
#Volume goes in increments of 2, so 50 is 100%
Set-Speaker -Volume 50