I have the following:
$test = [pscustomobject]@{ First = \"Donald\"; Middle = \"Fauntleroy\"; La
Not sure if it is really better, but here's one more variant:
$test.psobject.Members | ? {$_.Membertype -eq "noteproperty"} | %{ $_.Name + '='+ $_.Value }