Manhattan Supreme Court Justice Carol Edmead said Tuesday she will grant a preliminary injunction ordering the agency to conduct inspections in thousands of its units.

Edmead’s statement followed a hearing on Tuesday in which she lobbed tough questions at lawyers for the embattled New York City Housing Authority on inspecting its units for lead.