  Let $L$ be a countable language. We characterize, in terms of definable
closure, those countable theories $\Sigma$ of $\mathcal{L}_{\omega_1,
\omega}(L)$ for which there exists an $S_\infty$-invariant probability measure
on the collection of models of $\Sigma$ with underlying set $\mathbb{N}$.
Restricting to $\mathcal{L}_{\omega, \omega}(L)$, this answers an open question
of Gaifman from 1964, via a translation between $S_\infty$-invariant measures
and Gaifman's symmetric measure-models with strict equality. It also extends
the known characterization in the case where $\Sigma$ implies a Scott sentence.
To establish our result, we introduce machinery for building invariant measures
from a directed system of countable structures with measures.
