Characterisation and control of the dynamical properties of swimming microorganisms under confinement