This is specific to the PowerShell SDK, and somewhat ugly, but might give you some ideas on hacking your way around this quirk.
In Splunk-Search.psm1, on line 142, I changed this:
{$_.k -eq "_raw"} { $Myobj.Add("raw",$_.v.'#text');continue}
to this:
{$_.k -eq "_raw"} {
$rawTemp = $_.v.OuterXml
$rawTemp = $rawTemp -replace "<v xml:space=`"preserve`" trunc=`"0`">", ""
$rawTemp = $rawTemp -replace "<sg h=`"1`">", ""
$rawTemp = $rawTemp -replace "</sg>", ""
$rawTemp = $rawTemp -replace "</v>", ""
#write-host "rawTemp: $rawTemp";
$Myobj.Add("raw",$rawTemp);continue}
Good luck
... View more