In this paper it is shown that, for a module M over a ring R with S=EndR(M), the endomorphism ring of the R[x]-module M[x] is isomorphic to a subring of S[[x]]. Also the endomorphism ring of the R[[x]]-module M[[x]] is isomorphic to S[[x]]. As a consequence, we show that for a module MR and an arbitrary nonempty set of not necessarily commuting indeterminates X, MR is quasi-Baer if and only if M[X]R[X] is quasi-Baer if and only if M[[X]]R[[X]] is quasi-Baer if and only if M[x]R[x] is quasi-Baer if and only if M[[x]]R[[x]] is quasi-Baer. Moreover, a module MR with IFP, is Baer if and only if M[x]R[x] is Baer if and only if M[[x]]R[[x]] is Baer. It is also shown that, when MR is a finitely generated module, and every semicentral idempotent in S is central, then M[[X]]R[[X]] is endo-p.q.-Baer if and only if M[[x]]R[[x]] is endo-p.q.-Baer if and only if MR is endo-p.q.-Baer and every countable family of fully invariant direct summand of M has a generalized countable join. Our results extend several existing results.