We study networks with positive and negative customers (or Generalized networks of queues and signals) in a random environment. This environment may change the arrival rates, the routing probabilities, the service rates and also the effect of signals. We prove that the steady-state distribution has a product form. This property is obtained as a corollary of a much more general result on multidimensional Markov chains.