The man known for dressing up in an Elmo costume and harassing New York City tourists with anti-Semitic outbursts was sentenced in Manhattan Criminal Court on Wednesday to a year in jail after admitting he tried to extort $2 million from the Girl Scouts.

. . .

Last month, Mr. Sandler, 49, of Ashland, Ore., pleaded guilty to reduced charges of second-degree attempted grand larceny and third-degree stalking in return for the one-year sentence. Prosecutors said he sent harassing e-mails in 2012 to his former supervisor at the Girl Scouts, where he had worked in 2007 and 2008 on a short-term computer programming project. He also tried to force his way into the organization’s headquarters in Manhattan.

. . .

Mr. Sandler’s lawyer, Lori Cohen, said he pleaded guilty to extortion to avoid a trial and the risk of a longer sentence for the original top charge, first-degree attempted larceny. Still, Ms. Cohen said the evidence was weak.

“Is there any realm in which we think the Girl Scouts would pay him money because he sent them e-mails?” she said. “It was sort of a silly case.”