The Obama administration is rushing to comply with a federal court order, dispersing officials throughout the U.S. to personally seize more than 2,000 work permits that were granted to illegal immigrants under the president’s executive actions.

The federal immigration authorities will make personal home visits to caution immigrants that their deportation protections will expire at the end of the month.

The government is scrambling to rescind the permits after U.S. District Judge Andrew Hanen ordered in early July that Homeland Security Secretary Jeh Johnson and other top immigration officials testify in his Brownsville, Texas court.

Hanen demanded the officials explain why they should not be held in contempt for violating the court’s February injunction barring a program granting extended work permits under President Obama’s executive actions.

In his order, Hanen said he was “shocked and surprised at the cavalier attitude” of the administration after two months passed without action following the government’s promise to the court it was taking “immediate steps” to rectify the violations.

The administration has until July 31 to take back the three-year permits and reissue them for the original two-year period to avoid the risk of Johnson and other top Homeland Security officials being held in contempt of the court.

Johnson filed a memo in court Wednesday saying the administration is ramping up efforts to retrieve the documents, sending immigration authorities door-to-door to the homes of the illegal immigrants who have the three-year permits.

Under a 2012 executive program called Deferred Action for Childhood Arrivals (DACA), Obama originally granted the temporary two-year legal status to immigrants who were brought to the U.S. illegally as children and attended school in the country.

In 2014, as part of new executive actions that expand the pool of eligible protected children, Obama issued an executive order extending the work permits to three years, allowing immigrants to apply for the additional legal protection.

A spokesman for U.S. Citizenship and Immigration Services, an agency under Homeland Security, told Politico that immigration officials have collected about 900 of the nearly 2,500 three-year permits.

Obama’s 2014 executive action also shields certain parents of already protected children from deportation.

In February, Hanen issued an injunction against Obama’s 2014 executive action. The DACA program was not impacted by this.

A federal appeals court is currently deciding whether to allow the 2014 program to move forward. The case is expected to rise to the Supreme Court.