Can the president decide a military member fate in the service?

THe President is the commander-in-chief of all military services. He has to act under military law. He has the power to pardon a person who is convicted of some offense. He can demote or re-assign officers.