There are several things that can be done all fall under Article 134 of the UCMJ. This is a very ambiguous articles. It is considered to be the "catch all" article. For things considered to be "prejudicial to good order and discipline"
Article 134. General article:
Though not specifically mentioned in this chapter, all disorders and neglects to the prejudice of good order and discipline in the armed forces, all conduct of a nature to bring discredit upon the armed forces, and crimes and offenses not capital, of which persons subject to this chapter may be guilty, shall be taken cognizance of by a general, special, or summary court-martial, according to the nature and degree of the offense, and shall be punished at the discretion of that court.
Example; Cohabitation, Wrongful
"See Paragraph 60 (Article 134 - General Article).
Elements.
(1) That, during a certain period of time, the accused and another person openly and publicly lived together as husband and wife, holding themselves out as such;
(2) That the other person was not the spouse of the accused;
(3) That, under the circumstances, the conduct of the accused was to the prejudice of good order and discipline in the armed forces or was of a nature to bring discredit upon the armed forces.
Explanation. This offense differs from adultery (see paragraph 62) in that it is not necessary to prove that one of the partners was married or that sexual intercourse took place. Public knowledge of the wrongfulness of the relationship is not required, but the partners must behave in a manner, as exhibited by conduct or language, that leads others to believe that a martial relationship exists.
Lesser included offense. Article 80—attempts
Maximum punishment. Confinement for 4 months and forfeiture of two-thirds pay per month for 4 months.
Or; Indecent Acts With Another
See Paragraph 60 (Article 134 - General Article).
Elements.
(1) That the accused committed a certain wrongful act with a certain person;
(2) That the act was indecent; and
(3) That, under the circumstances, the conduct of the accused was to the prejudice of good order and discipline in the armed forces or was of a nature to bring discredit upon the armed forces.
Explanation. “Indecent” signifies that form of immorality relating to sexual impurity which is not only grossly vulgar, obscene, and repugnant to common propriety, but tends to excite lust and deprave the morals with respect to sexual relations.
Lesser included offenses. Article 80—attempts
Maximum punishment. Dishonorable discharge, forfeiture of all pay and allowances, and confinement for 5 years."
Some offenses formerly adjudicated under Article 34 have been moved to Article 120, a much more punitive Article as it is based on events such as rape.