Skip to content
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

Merged
merged 5 commits into from Jan 15, 2018

Conversation

ahotton
Copy link
Contributor

@ahotton ahotton commented Dec 27, 2017

Can you push the resolution of the UTF8 problem on the master branch please.

@TraGicCode
Copy link
Contributor

Can you please provide more information on what system you are having the issue on?

@TraGicCode TraGicCode self-requested a review January 6, 2018 00:52
@@ -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')
Copy link
Contributor

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?

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

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 !

Copy link
Contributor Author

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.

Copy link
Contributor

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!

Copy link
Contributor Author

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.

Copy link
Contributor

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.
@TraGicCode
Copy link
Contributor

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?

@ahotton
Copy link
Contributor Author

ahotton commented Jan 15, 2018

Thanks @TraGicCode for your work.

@rnelson0 rnelson0 changed the title Resolve UTF8 problem Resolve UTF8 problem with PowerShell output Jan 15, 2018
@rnelson0 rnelson0 merged commit bf72b70 into voxpupuli:master Jan 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants