It is quite different, as an employee you can be convicted for what you were ordered to do by your employer.

If you do an illegal thing while following government orders you can only be convicted if your country loses a war.