I’m running some Citrix powershell commands that output arrays of objects. They look right on the screen, but when I output to CSV, it shows the object type. I’ve looked around, and I haven’t found a good answer on how to expand this – especially because some of the properties are not arrays, and some are.
Get-XAApplication | foreach {Get-XAApplicationReport -BrowserName $_.Browsername} | Select-Object DisplayName,Accounts,ServerNames
The output comes out like this on the screen:
DisplayName                            Accounts                            ServerNames -----------                            --------                               ----------- Notepad                                {Domain\Domain Users, Domain\Domain Ad... {Server1, Server2, Server3... Word 2010                              {Domain\Domain Users, SWRCU\Domain Ad... {Server1, Server2, Server3...
The Accounts & Servernames are arrays.
I am trying to do this:
Get-XAApplication | foreach {Get-XAApplicationReport -BrowserName $_.Browsername} | Select-Object DisplayName,Accounts,ServerNames | export-csv -path c:\temp\AppReport.csv
I get this in the CSV file:
#TYPE Selected.Citrix.XenApp.Commands.XAApplicationReport "DisplayName","Accounts","ServerNames" "Notepad","Citrix.XenApp.Commands.XAAccount[]","System.String[]" "Word 2010","Citrix.XenApp.Commands.XAAccount[]","System.String[]"
I’m primarily concerned with the correct technique to expand those arrays in the CSV file.
Thank you for any help.
David F.