Occasionally in tabletop role-playing games, there is a logical need for there to be a commanding officer in the group. The more modern or futuristic the game gets, the more likely this is. Unfortunately, having the commanding officer an NPC means that you, the GM, are leading the players around by the nose and having a PC as the commander can lead to all sorts of problems at the table. Power, after all, corrupts, and as much as everyone likes being the heroic leader, that also means they'll be front and centre in the action, making all the decisions and leeching fun from the game for everyone else. Always remember that whatever is happening in game, you are also a bunch of friends playing a game around a table. Fun comes first.
Thanks to the unfortunate but scripted death of our NPC commanding officer in a Mechwarrior game, I became the leader of the unit and, over my tenure, I made myself some rules that would allow everyone else to retain as much creativity, freedom and enjoyment in the game as possible.
- Explain to the players out of character that although you outrank them in game and will be playing that role, you don't want to impinge on their creativity and freedom. Make it clear that they can do things their own way and, indeed, can do their own thing (within reason).
- Leave the players as much latitude as you can. If you give them an order, leave it to them to execute it. So, say "secure the room" instead of "Frank, guard that door. Sue, guard that door" and so on. Act as though you trust each and every player to know how to do their job (even if they don't...)
- Be fair. Use each PC for the job for which they are trained, including yourself. The party will quickly pick up that you use the correct tool for the job without fear or favour. In that respect, you, as captain, are treating everyone equally, including yourself.
- Stand by your sergeant (at least in public). Give the second in command autonomy to give orders as well. Override only if absolutely necessary.
- If the players do something which is outside the parameters of the mission and could get them into trouble if you, as captain, found out, then don't look too hard. Again, within reason.
- If you have to dress someone down in character for exercising their creativity and freedom because the consequences were just a little hard to ignore, start by saying something like "Out of character, I don't mean this. That was awesome. In character... WHAT WERE YOU THINKING?..."
- Don't be a glory hound but do take risks as appropriate. Show the group you're willing to risk your life for them or for the mission.
- Unless there is a good reason why someone else would be more appropriate, be the last to leave in dangerous situations. Cover the team as they get to safety - then join them.
- Reward the players in game for doing their jobs well. Promotions, medals, whatever.
- Check in with the players occasionally to make sure you're not stifling them too much.
The short version is that the leader of the party should be a sort of a half-GM. Someone who will put the enjoyment of others and the proper functioning of the game first. If you are a GM planning a military adventure, then I recommend choosing an ex-GM for the leadership role.