查询PowerShell当前版本
$psversiontable.BuildVersion.Major


查询Windows当前版本:
[System.Environment]::OSVersion.Version.Major
([string]::concat((cmd /c "ver"))).split(" ")[3].split(".")[0]

相关文章:

  • 2021-09-04
  • 2021-12-30
  • 2022-01-16
  • 2021-11-29
  • 2022-01-06
  • 2021-10-11
  • 2021-12-11
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-12-26
  • 2021-11-06
  • 2021-08-04
  • 2022-02-08
  • 2021-09-16
  • 2021-09-07
相关资源
相似解决方案