The near-unanimous vote came after President Donald Trump walked back months of opposition to opening a case file.