A search for the standard model (SM) Higgs boson () decaying to when produced in association with a weak vector boson () is reported for the following processes: , , , , and . The search is performed in data samples corresponding to an integrated luminosity of 35.9~\mathrm{fb}^{-1} at \sqrt{s}=13~\mathrm{TeV} recorded by the CMS experiment at the LHC during \mathrm{Run~2} in 2016. An excess of events is observed in data compared to the expectation in the absence of a signal. The significance of this excess is standard deviations, where the expectation from SM Higgs boson production is . The signal strength corresponding to this excess, relative to that of the SM Higgs boson production is . This result is combined with the one from the search for the same processes performed by the CMS experiment in \mathrm{Run~1} of the LHC (using proton-proton collisions at and \sqrt{s}=8~\mathrm{TeV} with data samples corresponding to luminosities of up to 5.1~\mathrm{fb}^{-1} and 18.9~\mathrm{fb}^{-1}, respectively). The observed combined signal significance is standard deviations, where are expected from a SM signal. The corresponding signal strength, relative to that of the SM Higgs boson, is .