Bill Shine, the former Fox News executive who was pushed out over his handling of sexual harassment scandals at the network, was named the White House deputy chief of staff for communications on Thursday.

The move formalizes a job that Mr. Shine has been in since earlier this week, according to White House officials. With no vacant office to work in yet, Mr. Shine has been occupying a desk outside the principal deputy press secretary’s office, the officials said.

Mr. Shine had been in talks with President Trump about a job since the spring, even playing golf with the president and Sean Hannity, the Fox News host and one of Mr. Shine’s close friends. But Mr. Shine had been uncertain that he wanted to make himself a target for fresh scrutiny, people who had talked with him at the time said.

Since then, the communications job has evolved into a position that reports directly to the president, overseeing both the press and communications teams. Mr. Trump has made the communications team a target of his ire throughout his time in office, and Mr. Shine is expected to help revamp it.