The miniaturization progressing of electronic components-used in switch cabinets for manufacturingincreases the packaging density as well as the volumetric dissipation power of the electrical components. As a result, high air temperatures inside the switch cabinets, an overheating and, with that, a reduction in the component life time may result. For this reason, switch cabinets must be cooled actively very often. The commercial CFD code FloTHERM is used to obtain the influence of the packing density of the electrical components, the geometry of the wiring system and the inner air flow on the temperature and the velocity distribution inside a switch cabinet of given size. Based on CFD calculations, measures for optimizing the internal setting of switch cabinets are presented in order to be able to use cooling capacity provided by active cooling devices (e.g. air/air heat exchangers, airconditioning units) as energy efficiently as possible for the avoidance of hotspot areas (areas of a high inside air temperature). For the validation of the CFD model, as well as the verification of the suggested optimizations, experimental data are used. The experimental data are obtained from measurements of temperatures and flow velocities, carried out at a test equipment for switch cabinets in the laboratory. To reproduce the thermal situation inside the tested switch cabinet, empty housings of electronic components are fitted with resistance heaters and installed in the switch cabinet. By a single pulse-width modulated voltage, applied to each resistance heater, a variable distributed overall dissipation power is adjustable. Different steady-state operating conditions of the switch cabinet with natural and forced convection with and without cooled air are investigated. Theoretical results for optimized internal settings of switch cabinets show potential for the conservation of cooling energy up to 23 % compared to the not optimized initial state.