Multivalued Properties exported sometimes?

When I run PowerShell ISE on my workstation and export to a CSV, cells in excel are populated with ‘Microsoft.Exchange.Data.Directory.ADMultiValuedProperty…’. When I open PowerShell, create a PSSession to the Exchange server and run the same export the relevant/correct text values appear in the cells.

Why does either method yield different results?
Form PowerShell ISE on workstation <Get-DistributionGroup -ResultSize Unlimited | Export-Csv> ------ some cells populate with MultivaluedProperty
From PowerShell PSSession to Exchange server1 - <Get-DistributionGroup -ResultSize Unlimited | Export-Csv> - values appear correct.
From PowerShell ISE PSSession to Exchange server1 - <Get-DistributionGroup -ResultSize Unlimited | Export-Csv> ------ some cells populate with MultivaluedProperty

There is a difference between running commands actually on the server or from a remote session. If you run commands from a remote session the output has to be serialzed, transfered and deserialized back. That’s why you see different results.

Regardless of that - could you please format your code as code here in the forum? (</> symbol on the edit bar) :wink:
Thanks in advance.

I am running all three examples from the workstation. The difference is the powershell, i.e., powershell ISE or regular powershell. I connect both using a pssession. the results are different. so just trying to understand why.

I understood that you use a PSSession in one case and in another case you the Exchange cmdlets directly.