A frustrated-looking Donald Trump appeared in a New York court via video-link on Tuesday to be informed by a judge that he cannot post certain evidence in his criminal case on social media.
Trump denies 34 counts of falsifying business records to cover up alleged hush money paid to porn star Stormy Daniels in 2016.
He became the first former or sitting president to ever be charged with a crime during an historic arraignment in Manhattan in April.
Judge Juan Merchan told Trump that he is barred from disclosing sensitive materials that the prosecution will hand over to his lawyers so they can prepare their defence.
Trump, appearing from Florida with two American flags draped behind him, said, "Yes I do" when asked by Merchan whether he had been given a copy of the order.
Wearing a dark blue suit and red tie, Trump shook his head when the judge said that he could be held in contempt of court if he violated the order.
The 76-year-old is allowed to post information already in the public domain and most evidence compiled by his own team, however.
But he is prohibited from publicising the names of some employees of the Manhattan district attorney Alvin Bragg, the prosecutor in the case, until the trial begins.
Merchan signed the order earlier this month after the prosecution requested that restrictions be placed on Trump's handling of evidence.
The district attorney's office cited Trump's track record of attacking witnesses and Bragg in social media posts. (AFP)