The formation control for multiple quadrotors subject to maintaining the formation configuration and collision avoidance in the situation of stochastic links failure is investigated in this paper. First, the distributed formation controller is designed, the position controller is developed to manage the desired formation of position, and the attitude controller is developed to control the translation and rotation movements of the quadrotor. Then, in order to avoid the collisions between multiple quadrotors and the obstacles, a potential energy function method is introduced into the quadrotor formation control combined with the nest adaptive control. Inspired by the design of event trigger controller, a communication compensation controller is designed to ensure the stability of quadrotor formation under the condition of random communication interruption and recovery. Moreover, a prescribed time function is designed, which means the convergence time of the formation system can be set in advance. The prescribed time stability of the formation control system is proved by Lyapunov theory. Finally, the simulation results verify the effectiveness and superiority of this method.