Skip to content

Commit

Permalink
Merge pull request #88 from jarretlavallee/86_windows2008_xml_issues
Browse files Browse the repository at this point in the history
(GH-86) Fix invalid XML from Get-WindowsFeature
  • Loading branch information
rnelson0 committed Sep 7, 2017
2 parents 404546f + b763cd6 commit 7248f14
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/puppet/provider/windowsfeature/default.rb
Expand Up @@ -20,10 +20,10 @@ def self.instances
# an array to store feature hashes
features = []
# set windows 2008 to true/False
win2008 = Facter.value(:kernelmajversion) == '6.1'
win2008 = Facter.value(:kernelmajversion) == '6.1' || Facter.value(:kernelmajversion) == '6.0'
# if win2008 import ServerManager module
result = if win2008 == true
ps('Import-Module ServerManager; Get-WindowsFeature | ConvertTo-XML -As String -Depth 4 -NoTypeInformation')
ps('Import-Module ServerManager; Get-WindowsFeature | Select Name,Installed | ConvertTo-XML -As String -Depth 4 -NoTypeInformation')
else
ps('Get-WindowsFeature | ConvertTo-XML -As String -Depth 4 -NoTypeInformation')
end
Expand Down

0 comments on commit 7248f14

Please sign in to comment.