Proper way to get Windows version

The original command here only returns the architecture (e.g. 64-bit) .
This command will return the version, build number, and architecture.
Tested on Windows Server 2012.