How do I preserve an unused computer?
I have a netbook that I am not using but would like to preserve for posterity. What precautions do I need to take to ensure that the machine does not undergo any deterioration? The machine will remain switched off most of the time.
If the computer will be stored a long time:
If it's small enough, I'd put it in an airtight container with a desiccant (you could get one of those ones intended for closet dehumidification. A laptop w/o battery in a ziplock with a "do not eat this" packet would be fine. A PC in an air-tight plastic storage box with a "dry closet" pack would be fine too.
Batteries are bad - they go bad, leak, etc. Ziplock those separately. For PC's, there's a battery on the motherboard for CMOS/etc. You could remove that and bag it separately. There's a small chance that it'll leak and corrode the motherboard.
However, if the computer will be stored unused for periods, but also used occasionally, then I'd just clean out the dust once in a while, make sure it's not in a moist place (since it will rust quickly), and keep an eye on any batteries. For laptops, remove the batteries unless you're actively using the computer. Half charged is best. The battery will eventually die anyway, but this will give it the best chances.
Really the only thing you need to worry about deteriorating is the battery. According to this question previously asked about laptop batteries your best bet is to store it half charged in a cool dry place. As always it's not a good idea to store the laptop in warm humid environment since moisture can seep in and collect on important components. Moisture also may have an affect on the screen, plastics, and silicon used in the chips, if you leave it exposed to such moisture over extended periods of time there is a chance they will warp. If you have to store it in an attic, basement, storage unit or any other environment that may expose the laptop to humidity over extended periods of time, I would suggest putting it in an airtight freezer ziplock bag. However if you plan on keeping it in a climate controlled portion of your house I would just worry about the battery as I have 10+ year old desktops and servers that still work just fine.
EDIT: Brad makes an excellent point (below) you should also take the battery out of the computer when storing it for long periods of time.