I will present the results of magnetised dense cores collapse 3D simulations including ambipolar diffusion with the adaptive-mesh-refinement code RAMSES. The numerical models cover a wide range of initial masses, form one to hundred solar masses, as well as the effect of initial rotation and/or turbulence. I will show how ambipolar diffusion acts on the formation of protostellar disks, which can subsequently launch collimated outflows. I will detail the properties of the disks and outlfows and the similarities between low and high-mass star formation