Can you use an electric motor as a generator?

Some types of dc electric motors can be used as generators of dc current if they are driven by another source of rotating power, such as a diesel or gas engine or an ac electric motor.

But many other types of electric motor - such as, for example 3-phase ac squirrel cage induction motors - cannot be used that way.