Bring a large pot of lightly salted water to a boil. Add spaghetti and cook for 8 to 10 minutes or until al dente; drain and set aside.
In a large skillet over medium heat, melt butter and add garlic, onion, mushrooms, broccoli, olives, and ham. Saute mixture until onions are translucent.
In a large bowl toss cooked spaghetti with vegetable mixture.