How to mute/unmute computer from PowerShell

Unfortunately, PowerShell and even WMI apparently don’t have access to the volume or mute functions. I found the program called NirCmd (download here) . The download is a zip, so created a directory called “c:\Program Files (x86)\NirCmd” and unzipped it there. The .chm help file has the syntax and command line options. Note, use “nircmdc.exe” the command line version to avoid any pop-up windows.

& "c:\Program Files (x86)\NirCmd\nircmdc.exe" mutesysvolume 0
& "c:\Program Files (x86)\NirCmd\nircmdc.exe" mutesysvolume 1

Other references:
C# to do it:

Why mute your sound from a Powershell?

I have a laptop from the company I’m consulting for. I want schedule a job to mute it at about 6pm and un-mute it at about 8am. I don’t normally turn computers off at night, but don’t want the sounds of incoming emails and such.

Leave a Reply

Recent Posts




All Rights Reserved Theme by 404 THEME.