Skip to content

Instantly share code, notes, and snippets.

@wsmelton
Created August 4, 2016 13:44
Show Gist options
  • Save wsmelton/3edce4fb3cd0816d17b30661b68df604 to your computer and use it in GitHub Desktop.
Save wsmelton/3edce4fb3cd0816d17b30661b68df604 to your computer and use it in GitHub Desktop.
$os = Get-ItemProperty 'HKLM:\Software\Microsoft\Windows NT\CurrentVersion' -ErrorVariable $osinfoError
$osInfoData = [pscustomobject]@{
"ProductName" = $os.ProductName;
"Version Number" = $os.CurrentVersion
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment