We need a way to disable the microphone so it cannot be re-enabled, at least by an unprivileged user. And preferably via the command line, so it can be scripted. On some Macs, we've been able to remove kexts, but on others, that also disables speakers, and we'd like to keep sound output.
I know this is an old post, but the above command does not work. "tell application "System Events" to set volume input volume 0". Sure, the slider moves all the way to the left, but if you make noise you can see the mic picking up input. If you manually move the slider then it mutes. Further analysis using the apple midi audio app indicates setting input volume to 0 via applescript actually sets it to 4. I've tried putting in -4 and other negative values hoping it would work. it does not.
I'm not sure why apple chose this behavior. It has been the result of setting input to 0 via applescript that it is not really 0 for years now. Very frustrating.
I think the only way you could do this is chmod and or chown the Preferences app, of course this can be done via the command line.
sudo chmod 000 /Applications/System\ Preferences.app
sudo chown root /Applications/System\ Preferences.app
In addition you could build an Apple Script to Mute the Microphone
tell application "System Events" to set volume input volume 0