Skip to content

Commit

Permalink
Merge pull request #301 from chef/2019
Browse files Browse the repository at this point in the history
Properly identify Windows 2019 in the install.ps1
  • Loading branch information
tas50 authored Dec 12, 2019
2 parents 13bbdce + 177f085 commit e436e27
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions lib/mixlib/install/generator/powershell/scripts/helpers.ps1.erb
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@

function Get-PlatformVersion {
switch -regex ((Get-Win32OS).version) {
'10\.0\.\d+' {$platform_version = '2016'}
'6\.3\.\d+' {$platform_version = '2012r2'}
'6\.2\.\d+' {$platform_version = '2012'}
'6\.1\.\d+' {$platform_version = '2008r2'}
'6\.0\.\d+' {$platform_version = '2008'}
'10\.0\.\d+' {$platform_version = '2016'}
'10\.0\.17\d+' {$platform_version = '2019'}
'6\.3\.\d+' {$platform_version = '2012r2'}
'6\.2\.\d+' {$platform_version = '2012'}
'6\.1\.\d+' {$platform_version = '2008r2'}
'6\.0\.\d+' {$platform_version = '2008'}
}

if(Test-Path 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Server\ServerLevels') {
Expand Down

0 comments on commit e436e27

Please sign in to comment.