Long before he became President Donald Trump’s White House communications director, Anthony Scaramucci was a simple hedge fund manager getting shut down by Barack Obama.

In 2010, as the nation was digging its way out of the 2008 financial collapse, Scaramucci took the microphone at a CNBC town hall to ask the then-president — a former Harvard classmate and sometimes opponent on the basketball court — whether he planned to “stop whacking at the Wall Street piñata.”

Scaramucci didn’t get the answer he was looking for.

“I have been amused over the last couple years, this sense of somehow me beating up on Wall Street,” Obama said. “I think most folks on Main Street feel they got beat up on.”

The line was met with applause.

In a four-minute response to Scaramucci’s question, Obama discussed the need to nurture a “vibrant” financial sector, but to do so in a “responsible way” — and took aim at critics who compared his “practical” financial reform efforts to Adolf Hitler storming Poland.

“Me saying, ‘Maybe you should be taxed more like your secretary,’ when you’re pulling home a billion dollars or a hundred million dollars a year I don’t think is me being extremist or me being anti-business,” Obama said.

The White House appointed Scaramucci to the role of White House communications director on Friday. He had previously made donations to Obama, and has made anti-Trump comments in the past.

In a Twitter rant early Saturday morning, Trump said Scaramucci would have endorsed him early on if the hedge fund manager had known he was running.