Electroweak bosons, W$^{\pm}$ and Z$^{0}$, are massive weakly-interacting particles insensitive to the strong interaction. Therefore, they are unique probes in pp and heavy-ion collisions and provide a medium-blind probe of the initial state of the heavy-ion collision.
In the ALICE experiment, the productions of W$^{\pm}$ and Z$^{0}$ are studied by exploiting their leptonic decay channels in a wide rapidity region.
In this contribution, the differential cross sections for W$^{\pm}$ and Z$^{0}$ in pp collisions at $\sqrt{s}=$ 13 TeV, p--Pb collisions at $\sqrt{s_{\mathrm{NN}}}=$ 8.16 TeV and Pb--Pb collisions at $\sqrt{s_{\mathrm{NN}}}=$ 5.02 TeV are reported. The charged particle multiplicity dependence of W bosons and the associated hadrons production in pp collisions at $\sqrt{s}=$ 13 TeV is also shown.