In a hearing Thursday afternoon, New York state Supreme Court Justice Kathryn Freed ruled that a deposition of Dauman could be conducted.

The ruling was the latest in a lawsuit filed in November in Los Angeles by Redstone’s ex-girlfriend Manuela Herzer, who has sued over her removal as the 92-year-old Redstone’s healthcare agent in favor of Dauman. She claims Redstone was not mentally competent to make that decision in October 2015.

“Mr. Dauman is prepared to cooperate fully with the court and provide any relevant information in the California action,” Dauman’s attorney Leslie Fagen, of Paul, Weiss, Rifkind, Wharton & Garrison, told reporters after the hearing.

Viacom and to a lesser extent CBS Corp (CBS.N), both majority-owned by Redstone, have come under scrutiny in light of Redstone’s declining health, which was highlighted by Herzer’s lawsuit.

As part of that lawsuit, Herzer claimed that a declaration by Dauman about discussions with Redstone was “riddled with falsehoods” because Redstone could not speak. Herzer also alleged that Redstone’s signature had been forged on a document filed with the court. Dauman asked the state supreme court in New York, where he is based, to shield him from being forced to give the deposition, leading to the Thursday hearing.

Herzer’s victory on Thursday is a blow to Viacom and Redstone’s case. Dauman, who took on the role of executive chairman from Redstone earlier this month, is under pressure to revive Viacom’s fortunes. The company missed Wall Street earnings estimates for the fifth straight quarter this month, sending its stock down more than 21 percent to a five-year low.

The deposition will relate to conversations Dauman had with Redstone on Oct. 8 and Nov. 3. Herzer was forced out of Redstone’s home on Oct. 12 and Redstone replaced Herzer with Dauman on his healthcare directive on Oct. 16. The judge asked for attorneys to try to conduct the deposition within the next 30 days. She said she did not expect it to take more than a day.

Dauman’s attorneys objected to any questions related to Viacom’s finances. The judge agreed to restrict the questions for the deposition to what Dauman and Redstone talked about without getting into specifics about Viacom finances.

The judge said she understood there was a “fine line” about what questions pertaining to Viacom’s finances could be asked, and said she would be available for the attorneys to contact during the deposition.

The next step in Herzer’s lawsuit is scheduled for next week. Redstone’s attorneys have moved to dismiss Herzer’s lawsuit, saying Redstone was fully aware of his actions and arguing that Herzer has filed her lawsuit for financial gain. A Los Angeles judge is set to consider on Feb. 29 whether to throw out Herzer’s lawsuit.