While Versailles is huge and can take a full day to fully see everything, don't be discouraged at having only a half day. If you plan well, you can see the main highlights.
Either show up before the doors open (which means leaving Paris early), tour the chateau and then wander the gardens. If time allows, go out to the Trianons and/or the Hamlet and at least see the exteriors (the interiors may not be open yet). This allows for a late lunch in town.
-or-
Show up about noon and explore the gardens first. You can tour the Trianons (probably choose only one) but watch your time. Tour the palace late afternoon. This means having a substantial breakfast or picking up sandwiches in town and having a quick picnic down by the canal (don't waste time at the on-site restaurants).
Either way the palace will be crowded. The goal is to limit wasting time in line. Set yourself a schedule so you know when to move on (you can spend a lot of time exploring the gardens they are so massive).