0

Back with a basic PowerShell question but to stupid to figure out myself. Trying to export data out to a csv or xlsx and the information is exporting as numbers instead of names and dates. What am I missing?

get-publicfolderitemstatistics -identity "\Public Folder\Contacts" | select-object subject | format-list | export-excel c:\contacts.xlsx

Example results 27c87ef9bbda4f709f6b4002fa4af63c 27c87ef9bbda4f709f6b4002fa4af63c 27c87ef9bbda4f709f6b4002fa4af63c

nosupport2020
  • 61
  • 1
  • 11
  • 2
    you definitely want to remove `format-list` from there, it's only meant for console display not for data export – Santiago Squarzon Feb 16 '22 at 20:53
  • 2
    `Format-*` cmdlets output objects whose sole purpose is to provide _formatting instructions_ to PowerShell's output-formatting system - see [this answer](https://stackoverflow.com/a/55174715/45375). In short: only ever use `Format-*` cmdlets to format data _for display_, never for subsequent _programmatic processing_. – mklement0 Feb 16 '22 at 20:58
  • Thanks! That resolved it – nosupport2020 Feb 17 '22 at 14:22

0 Answers0