Silicon Valley giants including Google, Facebook, Apple and Uber, have condemned Donald Trump’s executive orders on immigration and said they are preparing to hit back.

Thousands of staff in the tech industry could be affected by Mr Trump’s initiative, which bars refugees and travellers from seven Muslim-majority countries from entering the US.

Some executives said the ban, which bars anyone from Iran, Iraq, Libya, Somalia, Sudan, Syria and Yemen from entering the US for 90 days, ​violated their personal and company principles.

Donald Trump announces a ban on refugees and all visitors from Muslim-majority countries

The tech industry relies on the talent of foreign workers from around the world and is concerned the US President could give the industry’s temporary worker permits a - known as H-1B - a complete makeover.

Chief executives of the industry’s major companies have strongly criticised the ban.

Google told its employees with passports from those countries to cancel any travel plans outside the US and to get in touch with the company’s human resources department if they are not in the country.

The internet giant's chief executive, Sundar Pichai, said in a memo that at least 187 of its employees could be affected by the ban but it is unclear how many of them are currently outside the US.

"We've always made our views on immigration known publicly and will continue to do so," he said.

In an official statement, Google said: "We're concerned about the impact of this order and any proposals that could impose restrictions on Googlers and their families, or that could create barriers to bringing great talent to the US."

Apple’s CEO Tim Cook also hit back at Mr Trump’s executive order and made representations to the White House about the “negative effects” it will have on the company.

In a memo to his employees, Mr Cook wrote: "I share your concerns" about Trump's immigration order. It is not a policy we support. Apple would not exist without immigration, let alone thrive and innovate the way we do. We have reached out to the White House to explain the negative effect on our coworkers and our company.”

Apple founder Steve Jobs was the biological son of a Syrian immigrant.

The company said its human resources department was in contact with those affected although numbers have not been confirmed.

Facebook founder Mark Zuckerberg also took to social media to share his concerns over the ban.

“The United States is a nation of immigrants, and we should be proud of that,” he wrote, adding his grandparents came from Germany, Austria and Poland and his wife Priscilla's parents were refugees from China and Vietnam. “These issues are personal for me even beyond my family. A few years ago, I taught a class at a local middle school where some of my best students were undocumented.

He added: “They are our future too. We are a nation of immigrants, and we all benefit when the best and brightest from around the world can live, work and contribute here."

But some of the Silicon Valley's top leaders took a blunter stance on the ban.

Netflix CEO Reed Hastings wrote on Facebook that Mr Trump's "actions are hurting Netflix employees around the world, and are so un-American it pains us all. Worse, these actions will make America less safe (through hatred and loss of allies) rather than more safe."

EBay founder Pierre Omidyar, whose parents are Iranian, also slammed the order as "simple bigotry” while Tesla Motors and SpaceX founder Elon Musk tweeted that "many people negatively affected by this policy are strong supporters of the US" who don't "deserve to be rejected."

Microsoft Chief Executive who was born in India, said the company will continue to be an advocate on the issue.

“As an immigrant and as a CEO, I’ve both experienced and seen the positive impact that immigration has on our company, for the country, and for the world,” he wrote in an online post.

But the tech industry is bracing itself for more announcements on immigration regulation.

Thousands attend Women's March on Washington Show all 18 1 /18 Thousands attend Women's March on Washington Thousands attend Women's March on Washington Protesters gather outside the White House at the finish of the Women's March on Washington on January 21, 2017 in Washington, DC. Large crowds attended the anti-Trump rally a day after U.S. President Donald Trump was sworn in as the 45th U.S. president. Getty Thousands attend Women's March on Washington Protesters hold up signage near the Washington Monument during the Women's March on Washington January 21, 2017 in Washington, DC. Large crowds are attending the anti-Trump rally a day after U.S. President Donald Trump was sworn in as the 45th U.S. president. Drew Angerer/Getty Thousands attend Women's March on Washington Protesters gather during the Women's March on Washington January 21, 2017 in Washington, DC. The march is expected to draw thousands from across the country to protest newly inaugurated President Donald Trump. Aaron P. Bernstein/Getty Thousands attend Women's March on Washington Protesters arrive at the Capital South Metro station for the Women's March on Washington on January 21, 2017 in Washington, DC. Following the inauguration of Donald Trump as the 45th president of the United States, the Women's March has spread to be a global march calling on all concerned citizens to stand up for equality, diversity and inclusion and for women's rights to be recognised around the world as human rights. Jessica Kourkounis/Getty Thousands attend Women's March on Washington Protesters arrive on the platform at the Capital South Metro station for the Women's March on Washington on January 21, 2017 in Washington, DC. Following the inauguration of Donald Trump as the 45th president of the United States, the Women's March has spread to be a global march calling on all concerned citizens to stand up for equality, diversity and inclusion and for women's rights to be recognised around the world as human rights. Jessica Kourkounis/Getty Thousands attend Women's March on Washington Demonstrators protest during the Women's March along Pennsylvania Avenue January 21, 2017 in Washington, DC. Hundreds of thousands of protesters spearheaded by women's rights groups demonstrated across the US to send a defiant message to US President Donald Trump. Joshua Lott/AFP/Getty Images Thousands attend Women's March on Washington WASHINGTON, DC - JANUARY 21: Protesters attend the Women's March on Washington on January 21, 2017 in Washington, DC. Following the inauguration of Donald Trump as the 45th president of the United States, the Women's March has spread to be a global march calling on all concerned citizens to stand up for equality, diversity and inclusion and for women's rights to be recognised around the world as human rights. Jessica Kourkounis/Getty Thousands attend Women's March on Washington A marcher holds a sign during the Women's March on Washington January 21, 2017 in Washington, DC. The march is expected to draw thousands from across the country to protest newly inaugurated President Donald Trump. Aaron P. Bernstein/Getty Thousands attend Women's March on Washington A woman chants while attending the Women's March on Washington on January 21, 2017 in Washington, DC. Large crowds are attending the anti-Trump rally a day after U.S. President Donald Trump was sworn in as the 45th U.S. president. Mario Tama/Getty Thousands attend Women's March on Washington Protesters attend the Women's March on Washington on January 21, 2017 in Washington, DC. Large crowds are attending the anti-Trump rally a day after U.S. President Donald Trump was sworn in as the 45th U.S. president. Mario Tama/Getty Thousands attend Women's March on Washington Protesters march in Washington, DC, during the Women's March on January 21, 2017. Hundreds of thousands of people flooded US cities Saturday in a day of women's rights protests to mark President Donald Trump's first full day in office. Robyn Beck/AFP/Getty Images Thousands attend Women's March on Washington A protester gestures toward the White House on the Ellipse near the South Lawn of the White House during the Women's March on Washington January 21, 2017 in Washington, DC. Large crowds are attending the anti-Trump rally a day after U.S. President Donald Trump was sworn in as the 45th U.S. president. Drew Angerer/Getty Thousands attend Women's March on Washington A protester, holding a Donald Trump doll wearing a pink cap, marches in Washington, DC, during the Womens March on January 21, 2017. Hundreds of thousands of people flooded US cities Saturday in a day of women's rights protests to mark President Donald Trump's first full day in office. Robyn Beck/AFP/Getty Images Thousands attend Women's March on Washington Protesters take to the National Mall to demonstrate against the presidency of Donald Trump Washington, DC on January 21, 2017. Hundreds of thousands of protesters spearheaded by women's rights groups demonstrated across the US to send a defiant message to US President Donald Trump. Dominick Reuter/AFP/Getty Images Thousands attend Women's March on Washington Protesters march during the Women's March on Washington on January 21, 2017 in Washington, DC. Large crowds are attending the anti-Trump rally a day after U.S. President Donald Trump was sworn in as the 45th U.S. president. Mario Tama/Getty Thousands attend Women's March on Washington Demonstrators gather on The Ellipse during the Women's March on Washington January 21, 2017 in Washington, DC. Hundreds of thousands of protesters spearheaded by women's rights groups demonstrated across the US to send a defiant message to US President Donald Trump. Zach Gibson/AFP/Getty Images Thousands attend Women's March on Washington Demonstrators march down Pennsylvania Avenue during the Women's March on Washington January 21, 2017 in Washington, DC. Hundreds of thousands of protesters spearheaded by women's rights groups demonstrated across the US to send a defiant message to US President Donald Trump. Zach Gibson/AFP/Getty Images Thousands attend Women's March on Washington Protester's signs are left near the White House during the Women's March on Washington on January 21, 2017 in Washington, DC. Large crowds are attending the anti-Trump rally a day after U.S. President Donald Trump was sworn in as the 45th U.S. president. (Photo by Mario Tama/Getty Images) Mario Tama/Getty

A leaked draft of an executive order published in The New York Times suggests Mr Trump’s next target might give the H1-B programme, which lets the Silicon Valley bring foreigners with technical skills to the US for three to six years.