Disable / mute microphone from command line

Googling suggested "osascript -e 'set volume 0' " but that doesn't work.

I know I'd found this before... some command-line utility that had something to do with audio, mixers, whatever, but I forgot to keep it somewhere I could find it. I did find references to writing an AppleScript app, but that won't work here. I'm specifically looking for a command that comes with the OS that can be run in a bash shell.

Where is this being run from? You usually don't get access to audio devices without someone doing a proper GUI login.

I need to mute the microphone from within a script.

Yes... And where is the script running from?

If it's being run by a user that's logged into the computer -- even indirectly -- -- it may be able to get audio access. Things which weren't run from inside a logged in session won't.