In regards to current legal immigrants who obtained a green card through employment. As the status of green card holders is determined by the State Department and enforced by federal employees, does the executive have a mechanism to void/rescind/revoke "green cards" to persons who have done nothing in violation of their status.
A president can do nearly anything in the immediate term, and it would be up to the courts to stop it after the fact, something like revoking green cards would likely be stopped by the courts almost immediately. Proposing that the President would ever make such an order of revoking green cards en masse is entirely fear mongering though. A more likely, but still incredibly implausible possibility would be changing the apply and renewal processes substantially to prevent any newly issued green cards, this would also need to survive scrutiny from the court.
There are really only two ways that a green card can get revoked. The first is if the holder committed a crime worthy of deportation, and the second is fraud in the application process. The most likely mechanism, that would survive judicial review, a president could use to revoke green cards would be expanding these definitions. This would have a limited effectiveness as it still relies on green card holders committing crimes, or increased man hours to investigate potential fraud. The denying of entry for green card holders was met with heavy condemnation from the public at large, and a reasonably quick clarification from the White House that green card holders should not be denied entry based on the ban, this is good evidence that the President is OK with legal immigrants or that it would be political suicide to act on anti legal immigrant feelings.
The President can bar green card holders from entering the USA, even without formally voiding/resciding/revokig the green card.
See Trump's Muslim Ban.
There was some early confusion about the status of green-card holders (i.e., lawful permanent residents). According to the lawsuit filed by the states of Washington and Minnesota, dated February 3, the government had changed its position five times to date. Initially, on the evening of Friday January 27, the Department of Homeland Security sent out a guidance to airlines stated "lawful permanent residents are not included and may continue to travel to the USA". CNN reported that it was overruled by the White House overnight. Early Saturday, January 28, the Department of Homeland Security's Acting Press Secretary Gillian Christensen said in an e-mail to Reuters that the order barred green-card holders from the affected countries. By Saturday afternoon White House officials said they would need a case-by-case waiver to return. On Sunday White House Chief of Staff Reince Priebus said that green-card holders would not be prevented from returning to the United States.
According to the Associated Press no green-card holders were ultimately denied entry to the U.S. although several initially spent "long hours" in detention.
Note that this does not apply to actively deporting people already in the USA, for that I have no insight.