What are these parts and what do they do?

When I was taking apart these computers I got at a yard sale, I came across these parts. What are they and what do they do?

Picture of What are these parts and what do they do?
jj.inc5 years ago
Re-design is exactly right, the first is a solenoid. It moves in and out when electricity is applied/cut off. The other is a motor out of either a CD/DVD drive or hard disk drive. It needs a 4 wire stepper motor controller to drive it or another kind of special driver.
Re-design5 years ago
The first one looks like a solenoid. When voltage is applied to the two wires the electromagnet pull in the pin thus moving a lever or doing some other work.

The other one looks like a flat motor or bearing set used in a disk drive or something.

the motor needs a multi-phase driver to make it spin, it operates mostly like a stepper motor.