ESQUIMALT, B.C. -- A former Canadian Armed Forces corporal has been sentenced to three years in prison and another 20 years on the sex offender registry for assaulting a female service member and making secret video recordings of another on Vancouver Island and in Washington, DC.

Retired Cpl. Colin McGregor was sentenced by a military judge Thursday at Canadian Forces Base Esquimalt. Under the sentence, McGregor will be compelled to provide a DNA sample and is barred from possessing weapons for 10 years. He will also be "dismissed with disgrace" from the military.

McGregor's defence lawyer immediately appealed the judge's sentencing decision Thursday.

McGregor was found guilty Monday on one count of sexual assault, two counts of voyeurism, one count of disgraceful conduct and one count of possession of a device for the surreptitious interception of private communication.

McGregor was charged in May 2017 after a search of his Washington, DC home by the Canadian Forces National Investigation Service and local police led to the seizure of the electronic devices, according to the Department of National Defence.

Investigators found several video recordings in his possession, including video of a sex assault that occurred at CFB Esquimalt in 2011.

At the time of the seizure, McGregor was a resource manager and support clerk with the Canadian defence liaison staff in Washington.

The voyeurism charges stem from video recordings McGregor secretly made of a female forces member using his bathroom in the Washington, DC suburb of Alexandria, VA between 2016 and 2017. He was also found guilty of making similar recordings of another member in Victoria in 2011.

Both of McGregor's victims were present for the court martial proceedings and showed obvious signs of relief Monday when the verdicts were read.

McGregor will serve his sentence in a civilian prison, pending the outcome of his appeal.