What is the highest rank attained while serving in the US military?

typically the highest rank is a General (aka 4 star General), but in some cases one officer is promoted to General of the Army (5 star General) and in extremely rare cases (only twice in US history) a General can attain the rank of General of the Armies, which is senior to all officer ranks past and present.