I am aware that wind shear is the geostrophic wind between two pressure levels and am also aware of the catastrophic effect microbursts can have.
If informed, can the crew avoid wind shear? And if not, how do they deal with it?
When an aircraft experiences changing winds as it climbs or descends, this is technically "windshear" and it can have consequences (changes in airspeed and turbulence), but the much more dangerous phenomena is the microburst, and discussions of windshear avoidance and recovery are mostly concerned with that.
There are some good tools available for avoidance: major airports typically have Doppler radars that are designed specifically to detect microbursts and significant windshear events, and tower controllers broadcast those warnings. Airliners and other aircraft with modern radar systems have similar capabilities, looking ahead into their flightpath for the next few miles.
Without those capabilities, windshear detection was essentially accomplished by comparing groundspeed (from an INS or GPS) with indicated airspeed, and noting any changes in that relationship. So if your GS was 120 and your IAS was 100 (the difference due to combined effects of the wind plus the delta between True and Indicated Airspeed), then suddenly you had 130 knots GS and 95 knots IAS, you've suddenly picked up some tailwind, and if that trend continues, the loss in indicated airspeed could become catastrophic, and so an escape is necessary.
On a more basic level, some cues are typically published that may indicate windshear on approach:
unusual thrust lever position for a significant period of time
When you receive a warning from Tower or your onboard systems, aircraft that haven't started taking off (or are very early in the takeoff roll) stay on the ground, and aircraft on approach will discontinue the approach (go around). Since the effects of a microburst are much more pronounced close to the ground, the difference between encountering the microburst at 3000' AGL instead of 500' AGL may be the difference between a bumpy ride instead of a truly dangerous event. Also, if the microburst can be localized, either from radar or visually by observing virga or a storm cell, then turning away from it is often appropriate.
What is also practiced (in the simulator!) is what is referred to as a windshear escape maneuver, which is the aircraft manufacturer's (and possibly, operator's) best guidance for your best chance of surviving a windshear encounter. This would typically involve steps like advancing the power to the maximum available, retracting speedbrakes (if extended) to reduce drag, rolling wings level, and climbing as quickly as possible. At least in Boeing aircraft, it is not advised to change the flap configuration because doing so would increase your stall speed, and it's also not advised to retract the landing gear, because even though this would reduce the drag, it would also make any contact with the ground far more damaging. Each aircraft has its own procedure, but that's a general case.
A couple of links: