Due to the conservation of the canonical angular momentum, charged particle beams which are generated inside a solenoid field acquire a kinetic angular momentum outside of the solenoid field. The relation of kinetic orbital angular momentum to the field strength and the beam size on the cathode is called the Busch theorem. We formulate the Busch theorem in quantum mechanical form and discuss the generation of quantized vortex beams, i.e., beams carrying a quantized orbital angular momentum. Immersing a cathode in a solenoid field presents an efficient and flexible method for the generation of electron vortex beams, while, e.g., vortex ions can be generated by immersing a charge stripping foil in a solenoid field. Both techniques are utilized at accelerators for the production of nonquantized vortex beams. As a highly relevant use case we discuss in detail the conditions for the generation of quantized vortex beams from an immersed cathode in an electron microscope. General possibilities of this technique for the production of vortex beams of other charged particles are pointed out.