How to determine the Gen version installed on my server

I have more than 1000 servers' host-names list as an input and I need to work only with those that have Gen 8 installed on them, how do I select only those that follow this requirement?