President Donald Trump has used the government shutdown to reshape the federal workforce and target detractors.