The only people who should be raising alarms are the security guards (ones with longarms), but not the workers (ones with pistols), unless you're in a restricted area (which many of these missions send you into).
Security Guards scanning you will also raise an alarm if you are doing one where you have to sabotage/ upload a virus, which is illegal in your inventory.
There's definitely a code to be cracked with doing these missions, and some base setups are harder than others. Practice makes perfect though, and once you've got a way through that works for you, they're pretty straightforward (unless of course the setup is one of the harder bases)
Some tips that help me:
- re: batteries, stay indoors, keep your torch off and shields down. You won't consume energy like that... and use recharge points ; they're everywhere and usually one in each building. Basically, only use batteries in an emergency.
- on shields, a good discipline is to only ever raise shields when you are in combat... and even then, switch them off if you're running or there's a lull in the battle; only do it when you break cover.
- Maverick suit is good because it carries extra ebreaches, which you should use to beeline for the security console. This is important, because workers with pistols are easily survivable under fire, but guards aren't. If push comes to shove, you can manouver around workers' fire if you're waiting for something to happen. Without alarms as well, it's much easier to break contact and reenter once people settle down.
- on breaking contact.. if you need to interact with something that's impossible to do without violence, you can always run in, interact and break contact. It's nonviolent, not covert.
- use distractions... lob a grenade outside the building, activate non mission terminals/ data download points.
Edit: oh, and have an escape plan. You can always bug out and try again if you are detected too aggressively... or are successful and need to bug out anyway.
Edit 2: also, practice on missions without this requirement... just do everything like it's covert and nonviolent, even if it's not. That way you learn techniques that are universally applicable, but have a safety net of "going loud" in a pinch.