How to find the Windows version from the PowerShell command line

前端 未结 25 1065
野的像风
野的像风 2020-12-22 15:51

How do I find which Windows version I\'m using?

I\'m using PowerShell 2.0 and tried:

PS C:\\> ver
The term \'ver\' is not recognized as the name o         


        
25条回答
  •  情话喂你
    2020-12-22 16:12

    If you are trying to decipher info MS puts on their patching site such as https://technet.microsoft.com/en-us/library/security/ms17-010.aspx

    you will need a combo such as:

    $name=(Get-WmiObject Win32_OperatingSystem).caption $bit=(Get-WmiObject Win32_OperatingSystem).OSArchitecture $ver=(Get-ItemProperty "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion").ReleaseId Write-Host $name, $bit, $ver

    Microsoft Windows 10 Home 64-bit 1703

提交回复
热议问题