We provide out-of-sample certificates on the controlled invariance property of a given set with respect to a class of black-box linear systems. Specifically, we consider linear time-invariant models whose state space matrices are known only to belong to a certain family due to a possibly inexact quantification of some parameters. By exploiting a set of realizations of those undetermined parameters, verifying the controlled invariance property of the given set amounts to a linear program, whose feasibility allows us to establish an a-posteriori probabilistic certificate on the controlled invariance property of such a set with respect to the nominal linear time-invariant dynamics. The proposed framework is applied to the control of a networked multi-agent system with unknown weighted graph.