In many quantum-mechanical constructions, it is necessary to disentangle an operator-valued time-ordered exponential with time-dependent generators quadratic in the creation and annihilation operators. By disentangling, one understands the finding of the matrix elements of the time-ordered exponential or, in a more general formulation. The solution of the problem can also be reduced to calculation of a matrix time-ordered exponential that solves the corresponding classical problem. However, in either case the evolution equations in their usual form do not enable one to take into account explicitly the symmetry of the system. In this paper the methods of Weyl analysis are used to find an ordinary differential equation on a matrix Lie algebra that is invariant with respect to the adjoint action of the dynamical symmetry group of a quadratic Hamiltonian and replaces the operator evolution equation for the Green's function.