Eugene Volokh has a commentary on it if you’re interested:
https://www.washingtonpost.com/news/volokh-conspiracy/wp/2015/12/08/banning-muslims-from-entering-the-u-s-is-a-very-bad-idea-but-it-may-be-constitutionally-permissible/
Of course, if Trump implements the policy we will be out of allies in Europe and the Middle East.
And that will certainly help ISIS.