This article is from the FAQ, by with numerous contributions by others.
Yes. Spouse and Kids qualify for greencard irrespective (except for J1)
of the type of visa, as long as they are on a valid visa in USA.
The type of visa of the spouse/kids does matter. If the spouse/kids
are on a J-1/J-2 visa with a 2yr HRR, they may not adjust status to
permanent residency unless
(1) They have served the HRR
(2) Or have obtained a waiver of the HRR.