Quick way of detecting the operating system running on a list of computers
The Microsoft Sysinternals PsInfo utility can do that for you. PsInfo is a command-line tool that gathers key information about the local or remote Windows system.
So to get the information, we use PsInfo like this:
psinfo -c kernel \\@computerlist.txt
-c tells PsInfo we want a comma-delimited list.
kernel tells PsInfo we ONLY want the kernel field
\\@computerlist.txt tells PsInfo to use the list of computers in the computerlist.txt file.
PsInfo can be found here: http://technet.microsoft.com/en-us/sysinternals/bb897550.aspx