In this work we address optical orientation, a process consisting in the excitation of spin polarized electrons across the gap of a semiconductor. We show that the combination of optical orientation with spin-dependent scattering leading to the inverse spin-Hall effect, i.e., to the conversion of a spin current into an electrical signal, represents a powerful tool to generate and detect spin currents in solids. We consider a few examples where these two phenomena together allow addressing the spin-dependent transport properties across homogeneous samples or metal/semiconductor Schottky junctions.