Automate Adobe Experience Manager Integration Tasks from PowerShell
The CData ADO.NET Provider for Adobe Experience Manager is a standard ADO.NET Provider that make it easy to accomplish data cleansing, normalization, backup, and other integration tasks by enabling real-time access to Adobe Experience Manager.
ADO.NET Provider
The ADO.NET Provider provides a SQL interface for Adobe Experience Manager; this tutorial shows how to use the Provider to retrieve Adobe Experience Manager data.
Once you have acquired the necessary connection properties, accessing Adobe Experience Manager data in PowerShell can be enabled in three steps.
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.
-
Load the provider's assembly:
[Reflection.Assembly]::LoadFile("C:\Program Files\CData\CData ADO.NET Provider for Adobe Experience Manager\lib\System.Data.CData.AdobeExperienceManager.dll") -
Connect to Adobe Experience Manager:
$conn= New-Object System.Data.CData.AdobeExperienceManager.AdobeExperienceManagerConnection("URL=https://author-p12345-e67890.adobeaemcloud.com/crx/server;User=admin;Password=admin;") $conn.Open() -
Instantiate the AdobeExperienceManagerDataAdapter, execute an SQL query, and output the results:
$sql="SELECT Id, Name from Content" $da= New-Object System.Data.CData.AdobeExperienceManager.AdobeExperienceManagerDataAdapter($sql, $conn) $dt= New-Object System.Data.DataTable $da.Fill($dt) $dt.Rows | foreach { Write-Host $_.id $_.name }