Try another known working microphone in your computer.
Determine if the problem follows the microphone or stays with the computer.
If the microphone proves faulty with another source, plug it the microphone into a known working port and speak while gently twisting and squeezing the cable from end to end. Especially near the plugs.
There may a break or short somewhere in the cable. If so, the twisting, etc. may cause the microphone to briefly work.
If the problem stays with the computer then the connection port may be the problem.