If you make enough noise on here (the manufacturers watch and read these forums), you will get some relief if the machine is truly a lemon. It's in the dealer's and manufacturer's best interest to take care of you and to keep their name out of forums that have thousands of readers. Competition is fierce and they know that and they also know that you can't work if your machine is always broken down. I don't know why it takes so long to get things sorted out but I guess it all boils down to what it costs both sides.
Please post the machine make, year, model, and your options and what you use it for. Be as specific as possible about your experience running it, etc. Pictures help. I would also contact technical support at the manufacturer and make them aware of your pains. Don't bash your brand or the dealer, just state the facts and outline where you have been inconvenienced or lost money over these failures.
I had some issues with CAT and they stood up, took notice, and did the right thing. Bobcat has always stood up, too, when I had problems that were not my fault. Though I currently operate Bobcat, because my local CAT dealer (Holt) did the right thing, I will always consider them and recommend their management as stand-up guys even though they did not have to go to the lengths they did. It was a sore spot for a long time but everything worked out but it took a little whining to get my story out. Not all of us own 20 machines and can afford to have 1 lemon in the shop for months at a time.
I'm not as much of a believer in "bad machines" as I am bad parts or bad manufacturing processes. I've seen my Ford's and Dodge's go from Lemons to reliable with a few part swaps but it took awhile to get it figured out. I wish you good luck in sorting this out. I know it's hard to deal with..
"Life is tough, but it's tougher if you're stupid."