Windows command line: can I tell Service pack number

command lineservice-packwindows

Is there is a way to get service pack number from command line? Or the build number from command line (from which I can tell the service pack number (see How do I determine Windows Version and Service Pack from WindowsUpdateLog.txt))?

Upon starting cmd, part of the Windows version number is shown on the screen, but not the service pack number.

I prefer a non-PowerShell answer, but I wouldn't mind knowing about a PowerShell answer anyways since some computers I deal with do have it installed.

Best Answer

systeminfo | findstr /B /C:"OS Name" /C:"OS Version"

Source: Find windows version from command prompt