LQG control problems for guaranteeing finite-horizon performance subject to stability are proposed for switched linear systems and Markovian jump linear systems in the discrete-time domain. Exact, convex synthesis conditions for dynamic output feedback controllers are expressed in terms of nested unions of linear matrix inequalities. Thus feedback solutions are obtained by solving semidefinite programs offline. The resulting controllers recall a finite number of past modes of the plant’s operation. Moreover, closed-loop stability does not require long control horizon.