An analytical expression of the time-dependent probability distribution of M/D/1/N queues initialised in an arbitrary deterministic state is derived. We also obtain a simple analytical expression of the differential equation governing the transient average traffic which only involves probabilities of boundary states. As a by-product, a closed form solution of the departure rate from the system is also determined.