MScholtes/TechNet-Gallery

"FALSE" value being removed

memphisraynz opened this issue · 4 comments

Properties with the value of FALSE are having the value stripped.
Have multiple columns where the value is false, after transposing the value is now null.

Hello @memphisraynz,

are you writing about the script Transpose-Object?

Greetings

Markus

Yes it is.
I did find a solution. Looks like the If statement was returning false.
Found that if the If statement on line 70 is changed to 'if (-not [string]::IsNullOrEmpty($InputObject.($_)))' it works

Hello @memphisraynz,

I released a new version of Transpose-Object today. My solution differs slightly from yours as I want to keep an empty string preserved. Hope that's fine for you.

Greetings

Markus

Solution provided