Apple CEO Tim Cook took to Twitter on Wednesday to protest U.S. President Donald Trump's ban on transgender soldiers, joining other tech executives like Facebook's Mark Zuckerberg, Google's Sundar Pichai and Twitter's own Jack Dorsey.

"We are indebted to all who serve. Discrimination against anyone holds everyone back," Cook wrote. He added the hashtag "#LetThemServe", currently being used by many individuals and organizations opposed to Trump's latest stance.

Trump announced the ban in a surprise string of Twitter posts, saying that he reached his decision "after consultation with my Generals [sic] and military experts." The military can't be "burdened with the tremendous medical costs and disruption that transgender in the military would entail," he said.

Under the administration of Trump's predecessor, Barack Obama, new policies let transgender soldiers serve openly without fear of being discharged. Defense Secretary Ashton Carter said in fact that the Pentagon would cover costs for anyone needing to undergo gender transition.

We are indebted to all who serve. Discrimination against anyone holds everyone back. #LetThemServe — Tim Cook (@tim_cook) July 26, 2017

Cook has become a public advocate for LGBT causes, himself being openly gay. With respect to transgender issues, the executive has repeatedly sided against so-called "bathroom bills" forcing people to use bathrooms corresponding with their birth gender.