President Donald Trump vowed to end business as usual in Washington. Global companies are now learning just what that means.

What began before his inauguration, with attempts to cajole corporations like Toyota into keeping jobs in the U.S. with critical tweets, is now escalating into a crucial test for business leaders trying to maintain the cross-border flows of people and goods that underpin commerce in the 21st century.

Trump's Friday signing of an executive order barring the citizens of seven Muslim-majority countries from entering the U.S., on the heels of his war of words with Mexico over trade, alarmed executives from big employers including General Electric, Google and Microsoft. A chaotic weekend of protests, emergency court hearings and White House rebuttals left executives with a tricky choice: speak out and risk drawing fire from an outspoken president, or stay silent and face criticism from employees and activists.

GE Chief Executive Jeff Immelt's response underscored the delicate balance business will have to strike. "We have many employees from the named countries and we do business all over the region," he said in an internal e-mail. While he called those staff "critical to our success," he avoided direct criticism of Trump's policy. GE "will continue to make our voice heard with the new administration and congress and reiterate the importance of this issue," he said.

Trump's order shut the door to nationals of Iran, Iraq, Libya, Somalia, Sudan, Syria and Yemen — including refugees, visiting scholars and, at least temporarily, even permanent American residents who happened to be abroad for work or holidays. Confusion reigned in the first 48 hours of its implementation, with border agents and airlines unsure how to interpret the rules.

The decision, termed a "Muslim ban" by critics, fulfills a campaign promise that even Trump allies had suggested shouldn't be taken literally, signaling the White House's new occupant is committed to at least some of his most controversial pledges.

"We would never think this would become any kind of an issue," Ludwig Willisch, chief executive officer of North American operations at Bayerische Motoren Werke AG, said at an automotive conference on Saturday. "This country is a melting pot, freedom of speech, everybody gets together and creates this great country. So, we were not prepared for this kind of thing."

Criticism from pockets of corporate America, which was matched by statements from the leaders of Germany, France, and Canada, stood in stark contrast to the warm words toward Trump just a week ago. Executives at the World Economic Forum's annual meeting in Switzerland, including AT&T's Randall Stephenson and JPMorgan Chase & Co.'s Jamie Dimon, praised Trump's promises to overhaul corporate taxes and invest in infrastructure. Optimists suggested he would quietly drop pledges to tear up trade deals and reconsider defense commitments to allies.

Trump has "had this extraordinary honeymoon where Wall Street has kind of discounted all the negative aspects," Richard Fenning, the CEO of consultancy Control Risks, told Bloomberg Television. As companies react to the migrant ban, "perhaps that honeymoon is starting to be over," he said.

The about-face was epitomized by Tesla Motors founder Elon Musk; last week he praised Trump's nominee for secretary of state, former ExxonMobil CEO Rex Tillerson, as a potentially "excellent" pick. On Sunday, Musk tweeted that migrants "don't deserve to be rejected" and asked his 6.89 million Twitter followers to read the immigration order and suggest changes.

On the other hand, U.S. auto companies, whose home state of Michigan has a large Arab community, have yet to make their views known. Wall Street has also largely stayed out of the fray.

At some of its biggest banks, executives said they were struggling to understand whether the order will ultimately apply to employees who work in the U.S. with green cards or legal work permits. If it doesn't hit visa holders, few major companies' employees will be affected, according to one executive who asked not to be identified because he wasn't authorized to comment. On Sunday, JPMorgan said it was working to assist affected staff.

Starbucks CEO Howard Schultz said Trump's move left him with "deep concern, a heavy heart and a resolute promise." The coffee chain will redouble efforts to hire as many as 10,000 refugees over five years in 75 countries, he wrote in a note to employees Sunday.

Reaction was sharpest from the technology industry, with Twitter awash in reminders that Apple's late co-founder, Steve Jobs, was the son of a Syrian immigrant. Among the first to speak out was Google CEO Sundar Pichai, himself an immigrant from India, who called the policy "painful." Another India-born CEO, Microsoft's Satya Nadella, took to LinkedIn to highlight "the positive impact that immigration has on our company, for the country, for the world."

Trump should expect sustained challenges from the tech industry in particular, said Ian Bremmer, CEO of political consultancy Eurasia Group, because it differs significantly with him on issues from net neutrality to immigration. "While most every CEO wants to just 'get back to business' after Trump's election, that's going to prove much harder" for technology leaders, he said. "There's going to be a fight."

Compounding business leaders' unease was the order's confused implementation, which included unclear directives on how border agents should treat lawful permanent residents, and contradictory statements about how it would affect those who hold passports from two countries — for example, a dual citizen of Iran and the U.K.

For now, lawyers are advising such individuals not to travel to the U.S., or to stay put if they already live there. The new rules came into force with no transition period, leaving carriers like Emirates and American Airlines Group Inc. unsure what to do with passengers booked to fly to U.S. airports, or already in the air.

"We are committed to protecting our people and will provide whatever support is necessary to protect them and their families," Michael Roth, CEO of advertising firm Interpublic Group of Cos., wrote in an e-mail.