Local PC:

wmic os get Caption,CSDVersion /value

Remote PC:

wmic /node:NOME_PC os get Caption,CSDVersion /value