The W and Z boson production was measured via the muonic decay channel in proton-lead collisions at sNN=5.02 $ \sqrt{s_{\mathrm{NN}}}=5.02 $ TeV at the Large Hadron Collider with the ALICE detector. The measurement covers backward (−4.46 10 GeV/c are determined. The results are compared to theoretical calculations both with and without including the nuclear modification of the parton distribution functions. The W-boson production is also studied as a function of the collision centrality: the cross section of muons from W-boson decays is found to scale with the average number of binary nucleon-nucleon collisions within uncertainties.