  The magnetic behavior of polycrystalline samples of Er$_2$Ir$_2$O$_7$ and
Tb$_2$Ir$_2$O$_7$ pyrochlores is studied by magnetization measurements and
neutron diffraction. Both compounds undergo a magnetic transition at 140 and
130 K respectively, associated with an ordering of the Ir sublattice, signaled
by thermomagnetic hysteresis. In Tb$_2$Ir$_2$O$_7$, we show that the Ir
molecular field leads the Tb magnetic moments to order below 40 K in the
all-in/all-out magnetic arrangement. No sign of magnetic long range order on
the Er sublattice is evidenced in Er$_2$Ir$_2$O$_7$ down to 0.6 K where a spin
freezing is detected. These contrasting behaviors result from the competition
between the Ir molecular field and the different single-ion anisotropy of the
rare-earths on which it is acting. Additionally, this strongly supports the
all-in/all-out iridium magnetic order.
