New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Resolve UTF8 problem with PowerShell output #112
Conversation
Can you please provide more information on what system you are having the issue on? |
@@ -25,7 +25,7 @@ def self.instances | |||
result = if win2008 == true | |||
ps('Import-Module ServerManager; Get-WindowsFeature | Select Name,Installed | ConvertTo-XML -As String -Depth 4 -NoTypeInformation') | |||
else | |||
ps('Import-Module ServerManager; Get-WindowsFeature | ConvertTo-XML -As String -Depth 4 -NoTypeInformation') | |||
ps('Get-WindowsFeature | Select Name,Installed | ConvertTo-XML -As String -Depth 4 -NoTypeInformation') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did you remove the import and also remove the select statement?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It works on a Windows Server 2012 R2 FR
before :
...
Exception parsing
Line: 5
Position: 154
Last 80 unconsumed characters:
Acc?s ? distance
Line: 5
Position: 154
Last 80 unconsumed characters:
Acc?s ? distance
after :
......
Notice: /File[C:/ProgramData/PuppetLabs/puppet/var/lib/puppet/provider/windowsfeature/default.rb]/content: content changed '{md5}136f6129659cdbda75b6e73f41c39379' to '{md5}45c201f4597da588e2e27f63cf72ab6d'
......
Notice: Finished catalog run in 3.08 seconds
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and the output for the Get-WindowsFeature gets down from 1,5 Mo to few Ko, great !
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@BertrandJO has said everything.
Without this modification, you can not run the module on WINSRV 2K12 FR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the info. Give me a little bit of time as i try and juggle this with work + freetime + family! I need to rebuild my packer image for beaker acceptance testing so i can verify this!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Of course, no problem.
Thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have created my vagrant box using packer with the french version. I will let you know what i find. i will not be able to look at it today though :(
…nal for win2008. No reason to not import the module...it does not hurt anything.
I have refactored your changes and everything seems to be working now in regards to the UTF8 error you were experiencing. @bastelfreak Are you able to review this? |
Thanks @TraGicCode for your work. |
Can you push the resolution of the UTF8 problem on the master branch please.