Skip to content

Instantly share code, notes, and snippets.

@g3rhard
Created July 11, 2017 09:03
Show Gist options
  • Save g3rhard/1e1b19b099ee63fd0d9806754f041732 to your computer and use it in GitHub Desktop.
Save g3rhard/1e1b19b099ee63fd0d9806754f041732 to your computer and use it in GitHub Desktop.
Powershell скрипт, который узнает версию Windows
$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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment