Just go to Apple Menu > System Preferences > Sound > and click on the input tab. Now select another input source other than your microphone. This will disable your microphone:
Then close system preferences.
Now the system will look to the line-in port for source sound, not the microphone.
Is this what you wanted?
Meg The Dog: This process seems to me to be insecure from a systems security standpoint.
My interest is not to toggle the hardware, but to gain access to the hardware itself and disable its functionality. In windows there is a device manager where users can disable the hardware. If the system is compromised and the hardware is enabled, the user can log that information and it can help in future to make the network more secure.
So my question is not a network security issue, it is a computer software issue. Does the OS X have the administrator ability to disable the functionality of the hardware on the mainboard? In a more of a diagnostics and security perspective.