There is a holodisk called the Turret Override Program, which you obtain by finding a specific Total Hack magazine.
Anytime you use a terminal that has turrets connected to it, you can "load" the override program to get additional options.
There is a short readme file that states that "scrambling" the targeting parameters will cause the turrets to shoot everyone, including the player. I cannot for the life of me get this to work the way I expect. There's also a menu option for remote targeting, that makes it seem like you should be able to tell the turrets to shoot at specific targets, but this has never worked for me either.
How do I use the override program, especially to make the turrets shoot enemies?