Find windows OS version from command line


Local PC:

wmic os get Caption,CSDVersion /value

Remote PC:

psexec \\nome_pc wmic os get Caption,CSDVersion /value