A judge has upheld most aspects of a new law requiring Michigan public school employees to pay more for their pensions.