{"action":"created","issue":{"url":"https://api.github.com/repos/chef/train/issues/70","repository_url":"https://api.github.com/repos/chef/train","labels_url":"https://api.github.com/repos/chef/train/issues/70/labels{/name}","comments_url":"https://api.github.com/repos/chef/train/issues/70/comments","events_url":"https://api.github.com/repos/chef/train/issues/70/events","html_url":"https://github.com/chef/train/pull/70","id":133531735,"number":70,"title":"complete rewrite of windows version detection","user":{"login":"chris-rock","id":1178413,"avatar_url":"https://avatars.githubusercontent.com/u/1178413?v=3","gravatar_id":"","url":"https://api.github.com/users/chris-rock","html_url":"https://github.com/chris-rock","followers_url":"https://api.github.com/users/chris-rock/followers","following_url":"https://api.github.com/users/chris-rock/following{/other_user}","gists_url":"https://api.github.com/users/chris-rock/gists{/gist_id}","starred_url":"https://api.github.com/users/chris-rock/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chris-rock/subscriptions","organizations_url":"https://api.github.com/users/chris-rock/orgs","repos_url":"https://api.github.com/users/chris-rock/repos","events_url":"https://api.github.com/users/chris-rock/events{/privacy}","received_events_url":"https://api.github.com/users/chris-rock/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/chef/train/labels/Signed%20CLA","name":"Signed CLA","color":"ededed"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-02-14T11:31:45Z","updated_at":"2016-02-15T09:14:38Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/chef/train/pulls/70","html_url":"https://github.com/chef/train/pull/70","diff_url":"https://github.com/chef/train/pull/70.diff","patch_url":"https://github.com/chef/train/pull/70.patch"},"body":"The new Windows version detection is not based on Powershell anymore, it uses two core commands:\r\n- `ver` is a command-line tool since MSDOS that outputs the version of the Operating System\r\n- `systeminfo` was introduced in Windows XP Professional and outputs more system details\r\n\r\nUnfortunately we cannot rely on `ver` only, since build numbers and version are sometimes the same between Windows Client and Server. Therefore we cannot use this alone to distinguish between both operating systems.\r\n\r\nThis PR outputs the following for:\r\n- Win 2012 R2 - OS: `Windows Server 2012 R2 Standard`, OS release: `6.3.9600 N/A Build 9600`\r\n- Win 2008 - OS: `Windows Server 2008 R2 Standard`, OS release: `6.1.7601 Service Pack 1 Build 7601`"},"comment":{"url":"https://api.github.com/repos/chef/train/issues/comments/184126911","html_url":"https://github.com/chef/train/pull/70#issuecomment-184126911","issue_url":"https://api.github.com/repos/chef/train/issues/70","id":184126911,"user":{"login":"chris-rock","id":1178413,"avatar_url":"https://avatars.githubusercontent.com/u/1178413?v=3","gravatar_id":"","url":"https://api.github.com/users/chris-rock","html_url":"https://github.com/chris-rock","followers_url":"https://api.github.com/users/chris-rock/followers","following_url":"https://api.github.com/users/chris-rock/following{/other_user}","gists_url":"https://api.github.com/users/chris-rock/gists{/gist_id}","starred_url":"https://api.github.com/users/chris-rock/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chris-rock/subscriptions","organizations_url":"https://api.github.com/users/chris-rock/orgs","repos_url":"https://api.github.com/users/chris-rock/repos","events_url":"https://api.github.com/users/chris-rock/events{/privacy}","received_events_url":"https://api.github.com/users/chris-rock/received_events","type":"User","site_admin":false},"created_at":"2016-02-15T09:14:38Z","updated_at":"2016-02-15T09:14:38Z","body":"@mwrock Great Idea. Is that working on CLI as well? We do not have WinRM available all the time. I try to find a solution that is very minimal and works remote and locally. It should have no specific dependency on PowerShell or any scripting."}}