Returns the operating system name and version on the device.
To learn more about queries, check this guide
SELECT name, version FROM os_version;
$os = Get-CimInstance Win32_OperatingSystem
[PSCustomObject]@{
name = $os.Caption
version = $os.Version
} | Format-Table -AutoSize
PowerShell commands are currently work in progress, contributions welcome.