  Let $G$ be a (finite or infinite) group such that $G/Z(G)$ is not simple. The
non-commuting, non-generating graph $\Xi(G)$ of $G$ has vertex set $G \setminus
Z(G)$, with vertices $x$ and $y$ adjacent whenever $[x,y] \ne 1$ and $\langle
x, y \rangle \ne G$. We investigate the relationship between the structure of
$G$ and the connectedness and diameter of $\Xi(G)$. In particular, we prove
that the graph either: (i) is connected with diameter at most $4$; (ii)
consists of isolated vertices and a connected component of diameter at most
$4$; or (iii) is the union of two connected components of diameter $2$. We also
describe in detail the finite groups with graphs of type (iii). In the
companion paper arXiv:2212.01616, we consider the case where $G/Z(G)$ is finite
and simple.
