More than 400 soldiers have produced positive drug test results in the past four years with the vast majority given the boot, Defence documents reveal.

The documents, released under freedom of information, show 132 soldiers recorded positive test readings for illicit drugs in 2012-13, 101 in 2013-14, 102 in 2014-15 and 85 in the year to June.

Ecstasy remains the drug most commonly detected, with it found in some form in 96 tests.

That was followed by cannabis (80 positive readings), amphetamines (65), steroids (64) and methamphetamines (57).

Just four were busted for use of opiates, with 22 each for use of cocaines and benzodiazepines.

Under Defence's tough on drugs policy only one soldier escaped any penalty. Thirteen remain in the army on up to three years formal warning and seven cases from this year remain to be determined.

The rest were discharged from the army.