Any DC motor with permanent magnets can easily be a generator. It doesn't matter whether it is brushed or not; brushless motors make great generators but you will need to add a rectifier to get a DC output.
If the motor has a separate field winding instead of a permanent magnet, you will need to energise that winding from an external DC source, e.g. a battery.
For example, a car alternator has DC slip-rings (not a commutator!) to supply a small field current to the rotor, and a three phase (usually) stator winding. To get anything out, you must energise the field winding, and then you get 3-phase AC from the stator, which must be rectified in order to obtain DC. You can control the output power (and therefore the load the alternator places on the shaft) by modulating the field current.
You can google up plenty of howtos that tell you how to make a wind generator from recycled or homemade brushless permanent-magnet motors. They're a good design specifically because of the lack of brushes, because brushes wear out, are expensive and inefficient compared to a silicon rectifier.
If it's a "series wound" DC motor, I don't think it will generate unless part of the motor chassis is residually magnetised. That style of motor (only two terminals connecting to two windings and no permanent magnets) is generally not appropriate for generation because you have no guarantee it will do anything, and no good way to control the generated power/load.