How to pipe Adobe Experience Manager Data to CSV in PowerShell

Jerod Johnson
Jerod Johnson
Director, Technology Evangelism
Use standard PowerShell cmdlets to access Adobe Experience Manager tables.

The CData Cmdlets Module for Adobe Experience Manager is a standard PowerShell module offering straightforward integration with Adobe Experience Manager. Below, you will find examples of using our AdobeExperienceManager Cmdlets with native PowerShell cmdlets.

Creating a Connection to Your Adobe Experience Manager Data

The driver connects to Adobe Experience Manager (AEM) instances that expose the JCR repository over WebDAV. It supports both on-premises AEM and AEM as a Cloud Service deployments.

To establish a connection, set the following properties:

  • URL: The WebDAV-enabled JCR server URL.
    • AEM as a Cloud Service: https://author-pXXXXX-eXXXXX.adobeaemcloud.com/crx/server
    • Local development: http://localhost:4502/crx/server
  • User: Your AEM username.
  • Password: Your AEM password.

Note: Tables are dynamically generated based on the JCR repository structure. Ensure that the configured user has sufficient permissions to access the required content paths in the AEM repository.

$conn = Connect-AdobeExperienceManager  -URL "$URL" -User "$User" -Password "$Password"

Selecting Data

Follow the steps below to retrieve data from the Content table and pipe the result into to a CSV file:

Select-AdobeExperienceManager -Connection $conn -Table Content | Select -Property * -ExcludeProperty Connection,Table,Columns | Export-Csv -Path c:\myContentData.csv -NoTypeInformation

You will notice that we piped the results from Select-AdobeExperienceManager into a Select-Object cmdlet and excluded some properties before piping them into an Export-Csv cmdlet. We do this because the CData Cmdlets append Connection, Table, and Columns information onto each "row" in the result set, and we do not necessarily want that information in our CSV file.

The Connection, Table, and Columns are appended to the results in order to facilitate piping results from one of the CData Cmdlets directly into another one.

Ready to get started?

Download a free trial of the Adobe Experience Manager Cmdlets to get started:

 Download Now

Learn more:

Adobe Experience Manager Icon Adobe Experience Manager Data Cmdlets

An easy-to-use set of PowerShell Cmdlets offering real-time access to Adobe Experience Manager. The Cmdlets allow users to easily read, write, update, and delete live data - just like working with SQL server.