Arresting the miscreant Mayors and defunding the cities/schools will get the ball rolling. JMHO!
However, all states must conform to basic national security policies. Imagine a ludicrous situation where the nation was at war, but Calif didn't abide by defense measures?
So the trick for Trump is to simply frame illegal immigration as tantamount to an invasion from foreign nations. At that point, anyone providing comfort and support ie sanctuary cities, school districts, welfare offices, campuses, etc, are personally subject to federal prosecution.