Patent ID: 8707069

Claim:
A server, comprising: an enclosure comprising a base, and a cover detachably covering on the base, the base comprising a sidewall; a motherboard received in the base, the motherboard comprising a power-on pin, a voltage terminal, and a ground terminal; and a switch control circuit comprising: a first switch comprising a first terminal connected to the ground terminal of the motherboard, and a second terminal connected to the voltage terminal through a first resistor; an OR gate comprising a first input terminal connected to the second terminal of the first switch, a second input terminal, and an output terminal connected to the power-on pin of the motherboard; and a second switch mounted on the sidewall of the base, the second switch comprising a first terminal connected to the ground terminal of the motherboard, and a second terminal connected to the voltage terminal of the motherboard through a second resistor and connected to the second input terminal of the OR gate; wherein a stopping piece extends down from one side of the cover to abut against the second switch, wherein when the cover is not on the base, the stopping piece fails to abut against the second switch, the second switch is turned off, the output terminal of the OR gate outputs a power-off signal to the power-on pin of the motherboard to power off the server; wherein when the cover is on the base, the stopping piece abuts against the second switch to turn on the second switch, and when the first switch is turned on, the output terminal of the OR gate outputs a power-on signal to the power-on pin to power on the server.