Yields of W and Z bosons can be used to probe the nuclear parton distribution functions of quarks and antiquarks. Results on W boson and Drell-Yan production in pPb collisions using the CMS detector will be presented. The lepton decay channel is used to study both positive and negative W bosons as a function of lepton pseudorapidity. Rapidity and charge asymmetries in the W yield are studied. The Drell-Yan cross section is extracted as functions of the dimuon mass for the first time in pPb collisions, and both as a function of dimuon transverse momentum and rapidity, in the Z boson mass region.