Forum Discussion

ViktorMalum's avatar
ViktorMalum
Copper Contributor
Jun 26, 2025

Export-ActivityExplorerData with custom columns

I'm looking to use the Export-ActivityExplorerData cmdlet where I can customise the columns in the output csv file. By default I can't seem to choose which columns that appear in the output csv file.
Is there a way to do this?

1 Reply

  • Hello Viktor!
    Thanks for reaching out. I have reviewed the documentation but it seems the filter options described in the documentation are the ones available. The column customization is available for the UI version though.  Export-ActivityExplorerData (ExchangePowerShell) | Microsoft Learn
    For Powershell, you would have to programatically do this on Powershell, albeit a longer way but it can achieve autocreation of a new CSV if you are aware of the columns you want to strip out. Please note that you will first need to export the data using the Export-ActivityExplorerData cmdlet and run something like this:

    PowerShell 
    # Import the data $data = Import-Csv -Path "C:\path\to\output.csv"
    # Select the custom columns $customColumns = $data | Select-Object Column1, Column2, Column3
    # Export the customized data $customColumns | Export-Csv -Path "C:\path\to\custom_output.csv" -NoTypeInformation

     

Resources