After Cogen V was devastated by the Borg and the Cybermen in 2368, and the Cogenians abducted, Commander William Riker, Lieutenant Commander Data and Lieutenant Worf, together with the Doctor, Amy Pond and Rory Williams beamed down to the planet's surface to investigate. The surviving sentry drones immediately attacked the group. Data and Worf shot two down with phasers, while the Doctor used his sonic screwdriver to override a control wavelength and shut the third down.
He brought it back to the USS Enterprise-D where he studied its circuits and accessed its memory. He was able to obtain video footage that showed the Cybermen turning on the Borg on Cogen V. (TNG - Assimilation² comic: "Issue 4")