How can I mute/unmute my sound from PowerShell

后端 未结 10 2208
孤独总比滥情好
孤独总比滥情好 2020-11-29 06:14

Trying to write a PowerShell cmdlet that will mute the sound at start, unless already muted, and un-mute it at the end (only if it wasn\'t muted to begin with). Couldn\'t fi

10条回答
  •  感情败类
    2020-11-29 06:29

    Use the following commands on a ps1 powershell script:

    $obj = new-object -com wscript.shell 
    $obj.SendKeys([char]173)
    

提交回复
热议问题